Skip to content

Commit

Permalink
time.daylight does not tell us if we are currently in DST. Closes #2983
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Jan 20, 2016
1 parent 7d545d8 commit 85fbe12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions celery/utils/timeutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ def _fields(self, **extra):
}, **extra)


def utcoffset(time=_time):
if time.daylight:
def utcoffset(time=_time, localtime=_time.localtime):
if localtime().tm_isdst:
return time.altzone // 3600
return time.timezone // 3600

Expand Down

0 comments on commit 85fbe12

Please sign in to comment.