The section on Version 3 of the tzfile format from the man pages for tzfile states that:
... the hours part of its transition times may be signed and range from -167 through 167 instead of the POSIX-required unsigned values from 0 through 24.
However, the List of UTC offsets on wikipedia only lists zones between UTC-12 and UTC+14. The same goes for timezones listed on the List of tz database time zones.
- Are there any timezones that have a Universal Time offset greater than 24? When would this ever occur?
- Why would support for +/- 167 hours be added in Version 3?
- Is this referring to UT Offset listed in the ttinfo entries, or is it referring only to the POSIX.1-2017-style TZ string?
The section on Version 3 of the tzfile format from the man pages for tzfile states that:
... the hours part of its transition times may be signed and range from -167 through 167 instead of the POSIX-required unsigned values from 0 through 24.
However, the List of UTC offsets on wikipedia only lists zones between UTC-12 and UTC+14. The same goes for timezones listed on the List of tz database time zones.
- Are there any timezones that have a Universal Time offset greater than 24? When would this ever occur?
- Why would support for +/- 167 hours be added in Version 3?
- Is this referring to UT Offset listed in the ttinfo entries, or is it referring only to the POSIX.1-2017-style TZ string?
1 Answer
Reset to default 0As you pointed out, there are, at the time of writing, no timezones that have a Universal Time offset greater than 24 hours. This would occur when a governmental body declares it. Support for +/- 167 hours was likely added in Version 3 to handle that possibility. Consider that these offsets are specified by governmental decree, so the authors of this standard/code probably imagined that a bureaucrat may want to shift their timezone by nearly 1 week since 167 hours = 6 days and 23 hours. This is basically referring to both the UT Offset listed in the ttinfo entries, and to the POSIX.1-2017-style TZ string (), as explained in the man pages.
utoff
field [-89999, 93599] seconds ([-24:59:59, 25:59:59]), see sect. 3.2. That sounds more practical to me than -167 through 167 hours. An offset > 24h might occur if you want to shift a timezone by more than a day. Sounds rare to me but not impossible. – FObersteiner Commented Nov 20, 2024 at 16:05