mirror of https://github.com/Kozea/pygal.git
Browse Source
The date.fromtimestamp() method used in DateLine will treat it as local time, which is inconsistent with the datetime.utcfromtimestamp() method used in DateTimeLine, and causes tests to fail with timezone issues: >>> from datetime import datetime, date >>> t = 1473273687.227791 >>> datetime.utcfromtimestamp(t).date() datetime.date(2016, 9, 7) >>> date.fromtimestamp(t) datetime.date(2016, 9, 8) This commit changes the former to a datetime.utcfromtimestamp().date() call, which will always return consistent result as datetime.utcfromtimestamp() and thus fixes the tests.pull/339/head
Felix Yan
8 years ago
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue