unstale

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 init

@unstale/cli on npm

tzlocal 54 changes

Security 1

  • The tzdata archive is retrieved over HTTPS instead of FTP.

    5.4.5release notes

Fixes and other changes 3

  • Timezone file names with multiple slashes are now recognized in the TZ environment variable.

    5.4.5release notes

  • Improved handling of syntax errors in /etc/clock.

    5.4.4release notes

  • Release 5.4.2 was yanked for distribution issues.

    5.4.2release notes

tzlocal 28 changes

Breaking changes 3

  • tzlocal no longer loads the timezone from the current directory.

    2.0.0release notes

  • On Unix, tzlocal checks that a timezone name found in an /etc config file has the same offset as the local computer.

    2.0.0release notes

  • When no time zone configuration is found, tzlocal returns UTC instead of raising an exception.

    2.0.0release notes

Behavior and default changes 1

  • On Android, tzlocal gets the timezone via the Termux getprop wrapper; this is not officially supported.

    2.0.0release notes

Fixes and other changes 4

  • A BytesWarning was eliminated.

    2.0.0release notes

  • Parsing /etc/timezone now skips comment lines.

    2.0.0release notes

  • tzlocal verifies that configuration files contain something before reading them.

    2.0.0release notes

  • tzlocal now handles configuration file paths that exist but are directories.

    2.0.0release notes