1. Are there any time zones that currently observe DST with an offset other than adding one hour? (For this question, I am treating “negative DST” zones like Europe/Dublin and Africa/Windhoek as if they observed “standard” time in winter and adjusted time in summer. Also, for this question I am only interested in current practice, not historical.) 2. Is there an easy way I could have looked up this information in the tz files? (“Easy” means without exhaustively parsing all the Rule and Zone lines, as a processor would have to do.) Thanks, -- Doug Ewell, CC, ALB | Lakewood, CO, US | ewellic.org
Yes. Australia/Lord_Howe currently has a 30-minute difference between its standard and daylight times. Also, Antarctica/Troll has a 2-hour difference. I'm not sure if there's an easy way to determine this directly from the tz files, but since the data is also parsed and distributed through various platforms, languages, libraries, and tools, it's probably something you could do externally. For example, you could probably write some Python script with zoneinfo data, which originates from here. Another third-party option would be to look at the Wikipedia page that is generated based on the "current" data. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones Regards, Matt On Mon, Mar 3, 2025, 1:01 PM Doug Ewell via tz <tz@iana.org> wrote:
1. Are there any time zones that currently observe DST with an offset other than adding one hour?
(For this question, I am treating “negative DST” zones like Europe/Dublin and Africa/Windhoek as if they observed “standard” time in winter and adjusted time in summer. Also, for this question I am only interested in current practice, not historical.)
2. Is there an easy way I could have looked up this information in the tz files?
(“Easy” means without exhaustively parsing all the Rule and Zone lines, as a processor would have to do.)
Thanks,
-- Doug Ewell, CC, ALB | Lakewood, CO, US | ewellic.org
On Mon, 3 Mar 2025 at 21:24, Matt Johnson-Pint via tz <tz@iana.org> wrote:
Yes. Australia/Lord_Howe currently has a 30-minute difference between its standard and daylight times. Also, Antarctica/Troll has a 2-hour difference.
I'm not sure if there's an easy way to determine this directly from the tz files, but since the data is also parsed and distributed through various platforms, languages, libraries, and tools, it's probably something you could do externally. For example, you could probably write some Python script with zoneinfo data, which originates from here.
Those are the only two examples according to this C++ program: #include <chrono> #include <print> int main() { using namespace std::chrono; sys_days summer(2025y/6/21), winter(2025y/12/21); const auto& db = get_tzdb(); std::println("{}", db.version); for (const auto& tz : db.zones) { auto info1 = tz.get_info(summer); auto info2 = tz.get_info(winter); if (info1.offset != info2.offset) { if (abs(info1.offset - info2.offset) != 1h) std::println("{} has offset {} in summer and {} in winter", tz.name(), info1.offset, info2.offset); } } } The output on my system was: 2025a Antarctica/Troll has offset 7200s in summer and 0s in winter Australia/Lord_Howe has offset 37800s in summer and 39600s in winter
On Mon, 3 Mar 2025 at 21:35, Jonathan Wakely <jwakely@redhat.com> wrote:
On Mon, 3 Mar 2025 at 21:24, Matt Johnson-Pint via tz <tz@iana.org> wrote:
Yes. Australia/Lord_Howe currently has a 30-minute difference between its standard and daylight times. Also, Antarctica/Troll has a 2-hour difference.
I'm not sure if there's an easy way to determine this directly from the tz files, but since the data is also parsed and distributed through various platforms, languages, libraries, and tools, it's probably something you could do externally. For example, you could probably write some Python script with zoneinfo data, which originates from here.
Those are the only two examples according to this C++ program:
#include <chrono> #include <print>
int main() { using namespace std::chrono; sys_days summer(2025y/6/21), winter(2025y/12/21); const auto& db = get_tzdb(); std::println("{}", db.version); for (const auto& tz : db.zones) { auto info1 = tz.get_info(summer); auto info2 = tz.get_info(winter); if (info1.offset != info2.offset) { if (abs(info1.offset - info2.offset) != 1h) std::println("{} has offset {} in summer and {} in winter", tz.name(), info1.offset, info2.offset); } } }
The output on my system was:
2025a Antarctica/Troll has offset 7200s in summer and 0s in winter
Of course, June is not summer and December is not winter in Australia, oops :) Pretend I use June and December instead.
Australia/Lord_Howe has offset 37800s in summer and 39600s in winter
On Mon, 3 Mar 2025 at 16:01, Doug Ewell via tz <tz@iana.org> wrote:
2. Is there an easy way I could have looked up this information in the tz files?
(“Easy” means without exhaustively parsing all the Rule and Zone lines, as a processor would have to do.)
Not sure if you count grep as a processor, but you can drill down crudely with: grep -n "^Rule.*max" africa antarctica asia australasia europe northamerica southamerica Currently this yields the 52 lines which define Rules that continue until the max year. This is not *strictly* the same as "current practice", but rather "latest-dated ongoing prediction". (It also doesn't guarantee the Rules are actually used anywhere.) A quick visual scan of the penultimate column shows that all such SAVE values have an absolute value of either 0 or 1:00, apart from the Troll and LH rules as have been mentioned by others as the only exceptions. -- Tim Parenti
On 3/3/25 15:20, Tim Parenti via tz wrote:
... A quick visual scan of the penultimate column shows that all such SAVE values have an absolute value of either 0 or 1:00, apart from the Troll and LH rules as have been mentioned by others as the only exceptions. .
Does Ireland observe standard time in summer with an offset of -1:00 in winter? I guess not: GMT0IST,M3.5.0/1,M10.5.0 -- gil
On Mon, 3 Mar 2025 at 17:49, Paul Gilmartin via tz <tz@iana.org> wrote:
On 3/3/25 15:20, Tim Parenti via tz wrote:
... A quick visual scan of the penultimate column shows that all such SAVE
values have an absolute value of either 0 or 1:00, apart from the Troll and LH rules as have been mentioned by others as the only exceptions.
. Does Ireland observe standard time in summer with an offset of -1:00 in winter?
Based on the original question, "absolute" was an operative word in the phrase "absolute value". ;) -- Tim Parenti
Thanks to all for your responses. I was able to get my limited-scope issue resolved. -- Doug Ewell, CC, ALB | Lakewood, CO, US | ewellic.org
On 3/3/25 14:20, Tim Parenti via tz wrote:
Not sure if you count grep as a processor
Oh, I do: cd /usr/share/zoneinfo for file in $(awk '/^[^#]/{print $3}' zone1970.tab); do echo $file $(tail -n1 $file) done | grep ' [^,]*[0-9],' On Fedora 41 this outputs: Antarctica/Troll <+00>0<+02>-2,M3.5.0/1,M10.5.0/3 Australia/Lord_Howe <+1030>-10:30<+11>-11,M10.1.0,M4.1.0 Europe/Dublin IST-1GMT0,M10.5.0,M3.5.0/1 One can redo it without awk or grep but what would be the fun of that?
participants (6)
-
Doug Ewell -
Jonathan Wakely -
Matt Johnson-Pint -
Paul Eggert -
Paul Gilmartin -
Tim Parenti