pypi / tzlocal
tzlocal
What changed in tzlocal 2 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.
3 breaking1 security1 behavior and defaults7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittzlocal 54 changes
Security 1
The tzdata archive is retrieved over HTTPS instead of FTP.
Fixes and other changes 3
Timezone file names with multiple slashes are now recognized in the TZ environment variable.
Improved handling of syntax errors in /etc/clock.
Release 5.4.2 was yanked for distribution issues.
tzlocal 28 changes
Breaking changes 3
tzlocal no longer loads the timezone from the current directory.
On Unix, tzlocal checks that a timezone name found in an /etc config file has the same offset as the local computer.
When no time zone configuration is found, tzlocal returns UTC instead of raising an exception.
Behavior and default changes 1
On Android, tzlocal gets the timezone via the Termux getprop wrapper; this is not officially supported.
Fixes and other changes 4
A BytesWarning was eliminated.
Parsing /etc/timezone now skips comment lines.
tzlocal verifies that configuration files contain something before reading them.
tzlocal now handles configuration file paths that exist but are directories.