Conversation
|
With this the default is an aware python-telegram-bot/telegram/message.py Line 355 in 9344944 data['date'] = from_timestamp(data['date']).replace(tzinfo=None). Or the default for from_timestamp could be kept as naive UTC to avoid the breaking change.
Otherwise I think the only problem is handling if tzinfo is not None:
return dtm.datetime.fromtimestamp(unixtime, tz=tzinfo)
else:
return dtm.datetime.utcfromtimestamp(unixtime) |
Good point. Let's wait, what tsoam says.
Oh, shuh, you're absolutely right. Will update tonight. |
|
Updated as suggested. About the failing tests:
|
|
agree with the 2.7 part |
|
@plammens Lost in translation … Thanks for clarifying! |
tsnoam
left a comment
There was a problem hiding this comment.
one minor comment on a docstring. but LGTM, you can merge.
|
actually, i just fixed the docstring myself. you can merge from master and then you can merge this PR. |
# Conflicts: # tests/conftest.py
Closing #1613 as addendum to #1506
@tsnoam @plammens Is this, what was missing or am I overlooking half of it? :D