There was an error while loading. Please reload this page.
2 parents b5d272b + a2fdc90 commit 685f2e9Copy full SHA for 685f2e9
1 file changed
webapp/graphite/util.py
@@ -59,7 +59,7 @@ def epoch(dt):
59
if not dt.tzinfo:
60
tb = traceback.extract_stack(None, 2)
61
log.warning('epoch() called with non-timezone-aware datetime in %s at %s:%d' % (tb[0][2], tb[0][0], tb[0][1]))
62
- return calendar.timegm(make_aware(dt, pytz.timezone(settings.TIME_ZONE)).astimezone(pytz.utc).timetuple())
+ return calendar.timegm(pytz.timezone(settings.TIME_ZONE).localize(dt, is_dst=None).astimezone(pytz.utc).timetuple())
63
return calendar.timegm(dt.astimezone(pytz.utc).timetuple())
64
65
0 commit comments