sdispater / pytzdata

Official timezone database for Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`localtime` timezone missing in 2018.3

Hernrup opened this issue · comments

The localtime timezone information has been deleted in 2018.3. This unfortunately breaks a lot of out builds. What is the thought behind this and what is the proposed alternative solution for getting the local timezone information?

The localtime timezone should come from your system and not pytzdata. It usually resides in /etc/localtime.

It so happens that the localtime file was included in the zoneinfo directory provided by pytzdata but shouldn't have been used. As of the newer builds, this file no longer exists.

The only timezones supported are the one returned by pytzdata.timezones.

Thank you for the clarification. The issue has been resolved. Turns our we were running python in a docker container without any timezone set. The presence of the pytzdata localtime file masked the error and provided a fallback for our code. The sudden remove of the file caused a large amount of test containers to fail. Defining the timezone for the container resolves the issue.