[issue30062] datetime in Python 3.6+ no longer respects 'TZ' environment variable

Ammar Askar report at bugs.python.org
Sun Jun 25 01:22:50 EDT 2017


Ammar Askar added the comment:

Closing this since as you pointed out this behavior is already documented.

As an aside, seeing as you guys already have pytz as a dependency. Instead of fixing this with tzset you can also just explicitly do datetime.datetime.fromtimestamp(time, pytz.timezone(os.environ['TZ']))

----------
nosy: +ammar2
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30062>
_______________________________________


More information about the Python-bugs-list mailing list