Browse Source

Merge pull request #339 from felixonmars/utc-date

Use datetime.utcfromtimestamp to generate date() object
pull/373/merge
Mounier Florian 8 years ago committed by GitHub
parent
commit
735b06ac94
  1. 2
      pygal/graph/time.py

2
pygal/graph/time.py

@ -113,7 +113,7 @@ class DateLine(DateTimeLine):
def _x_format(self): def _x_format(self):
"""Return the value formatter for this graph""" """Return the value formatter for this graph"""
def date_to_str(x): def date_to_str(x):
d = date.fromtimestamp(x) d = datetime.utcfromtimestamp(x).date()
return self.x_value_formatter(d) return self.x_value_formatter(d)
return date_to_str return date_to_str

Loading…
Cancel
Save