A POSIX TZ string is a compact text representation of a time zone's rules — its standard time abbreviation, UTC offset, optional DST abbreviation, and DST start/end rules — encoded in a format defined by the POSIX standard. You'll see them in embedded systems, some Unix configurations, and as the last line of zoneinfo files.
Reading a POSIX TZ String
The format is: std offset [dst [offset] [,rule]]. For Eastern Time in the US: EST5EDT,M3.2.0,M11.1.0,02:00.
- EST — standard time abbreviation
- 5 — standard time is UTC−5 (note: POSIX uses the opposite sign convention from UTC offsets — a positive number means west of Greenwich)
- EDT — DST abbreviation
- (no second offset) — DST is standard offset − 1 hour, so UTC−4
- M3.2.0 — DST starts on the second (2) Sunday (0) of March (3)
- M11.1.0 — DST ends on the first (1) Sunday (0) of November (11)
- 02:00 — transitions happen at 2:00 AM local time
POSIX vs. IANA
POSIX TZ strings can express simple DST rules (a fixed Mx.y.z pattern), but they cannot express historical changes, the complex rules of jurisdictions with irregular DST dates (like Morocco's Ramadan suspension), or zones that have never had DST. The IANA database handles all of these cases.
In practice, IANA zoneinfo files are the preferred choice for any system that can use them. POSIX TZ strings appear in embedded devices (routers, IoT hardware, some industrial controllers) that lack the storage or processing power for full zoneinfo files, and in some UNIX environment configurations where a quick override is needed.