# What changed in tzlocal

> 12 changes in tzlocal 2 to 5 from its official release notes, upgrade guides and advisories: 3 breaking, 1 security. Each one cited. Sources checked 2026-10-24. HTML: https://unstale.sh/pypi/tzlocal/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## tzlocal 5

### Security

- The tzdata archive is retrieved over HTTPS instead of FTP. (5.4.5) — [release notes](https://github.com/regebro/tzlocal/blob/eeec91f748c2d36825b6e5aaa7a36a42241da512/CHANGES.txt#545-2026-10-22)

### Fixes and other changes

- Timezone file names with multiple slashes are now recognized in the TZ environment variable. (5.4.5) — [release notes](https://github.com/regebro/tzlocal/blob/eeec91f748c2d36825b6e5aaa7a36a42241da512/CHANGES.txt#545-2026-10-22)
- Improved handling of syntax errors in /etc/clock. (5.4.4) — [release notes](https://github.com/regebro/tzlocal/blob/b5349f69d0852e75aa66bb3a32d30f7f89d8b266/CHANGES.txt#544-2026-06-29)
- Release 5.4.2 was yanked for distribution issues. (5.4.2) — [release notes](https://github.com/regebro/tzlocal/blob/b5349f69d0852e75aa66bb3a32d30f7f89d8b266/CHANGES.txt#542-2026-06-16)

## tzlocal 2

### Breaking changes

- tzlocal no longer loads the timezone from the current directory. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)
- On Unix, tzlocal checks that a timezone name found in an /etc config file has the same offset as the local computer. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)
- When no time zone configuration is found, tzlocal returns UTC instead of raising an exception. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)

### Behavior and default changes

- On Android, tzlocal gets the timezone via the Termux getprop wrapper; this is not officially supported. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)

### Fixes and other changes

- A BytesWarning was eliminated. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)
- Parsing /etc/timezone now skips comment lines. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)
- tzlocal verifies that configuration files contain something before reading them. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)
- tzlocal now handles configuration file paths that exist but are directories. (2.0.0) — [release notes](https://github.com/regebro/tzlocal/blob/HEAD/CHANGES.txt)
