Skip to content

Commit

Permalink
Fix for poperly handle tz passed in form pytz
Browse files Browse the repository at this point in the history
Previously:
arrow.Arrow.fromtimestamp(0, pytz.timezone('Europe/Paris'))
# <Arrow [1970-01-01T01:00:00+00:09]>
Now:
arrow.Arrow.fromtimestamp(0, pytz.timezone('Europe/Paris'))
# <Arrow [1970-01-01T01:00:00+1:00]>
  • Loading branch information
andrewelkins committed Dec 31, 2016
1 parent a7daa31 commit 7f69ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arrow/arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def fromtimestamp(cls, timestamp, tzinfo=None):
dt = datetime.fromtimestamp(timestamp, tzinfo)

return cls(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second,
dt.microsecond, tzinfo)
dt.microsecond, dt.tzinfo)

@classmethod
def utcfromtimestamp(cls, timestamp):
Expand Down

0 comments on commit 7f69ace

Please sign in to comment.