New submission from Piotr Kamoda :
See below code:
>>> datetime.utcfromtimestamp(1557395250).astimezone(get_localzone()).strftime('%Y-%m-%d
>>> %H:%M:%S %z %Z')
'2019-05-09 09:47:30 +0200 CEST'
>>> datetime.fromtimestamp(1557395250).astimezone(ge
Piotr Kamoda added the comment:
Docs state that fromtimestamp returns a naive datetime object
(https://docs.python.org/3.7/library/datetime.html#datetime.datetime.fromtimestamp)
and not utcfromtimestamp. Perhaps it needs fixing.
Additionally, astimezone fails silently, I even tried
Piotr Kamoda added the comment:
Ok, now I see that naive object assumes my timezone in some cases. That's still
mind-boggling that utcfromtimestamp returns an object that shows utc hour but
when astimezone is applied it reverts without converting the hour to local
timezone.
See bel