[tz] Why is "AEST" the abbreviation for Australia/Sydney in 1900?

Arthur David Olson arthurdavidolson at gmail.com
Tue Apr 30 23:21:57 UTC 2024


A hand-waving explanation of AEST.

For a given zone, each line describing the zone except for the last ends
with an until time. The creation of the transition time entry for the until
time is deferred until the following zone line has been completely
processed. (It happens at the bottom of the giant for loop in outzone.)
That deferral means that the time zone abbreviations in use have been
computed, so the appropriate abbreviation can be applied to the until time.

    @dashdashado

On Tue, Apr 30, 2024 at 1:49 PM Jonathan Wakely via tz <tz at iana.org> wrote:

> Given this snippet from tzdata.zi:
>
> Z Australia/Sydney 10:4:52 - LMT 1895 F
>   10 AU AE%sT 1971
> R AU 1917 o - Ja 1 2s 1 D
> R AU 1917 o - Mar lastSu 2s 0 S
> R AU 1942 o - Ja 1 2s 1 D
> R AU 1942 o - Mar lastSu 2s 0 S
> R AU 1942 o - S 27 2s 1 D
> R AU 1943 1944 - Mar lastSu 2s 0 S
> R AU 1943 o - O 3 2s 1 D
>
> What should the abbreviation be for the zone in, say, 1900?
>
> Using glibc I get AEST:
>
> TZ=Australia/Sydney date --date="1900-01-01"
> Mon 1 Jan 00:00:00 AEST 1900
>
> But I don't see any way to get "AEST" from the tzdata and the spec in
> the zic(8) man page.
>
> Prior to 1895 it is "LMT", and then from 1917-01-01 it's "AEDT", and
> from 1917-03-25 it's "AEST", but none of the Rule lines apply to dates
> before 1917, so what value of LETTER/S should be used for the AE%sT
> format in 1900?
>
> Glibc solves this by iterating through all the transitions for the AU
> rule until it finds a valid name for a transition to DST and a valid
> name for a transition out of DST, and then remembers those two names,
> which in this case gives AEDT (from 1917-01-01 to 1917-03-25) and AEST
> (from 1917-03-25 to 1942-01-01). Then when it finds the info for a
> date in 1900 it looks at the isdst field of struct tm for that date,
> and picks one of the two remembered names, which gives us "AEST". That
> seems like the correct result, but nothing in the zic man page (or any
> other docs I can find) says that is what's supposed to happen.
>
> My code for GCC's C++ library is an independent implementation based
> on the spec, and it has no way to produce "AEST" for 1900.
>
> It seems to me that either the spec should to do ... something ... so
> that a LETTER/S field for the Rule can be found, or there should be a
> Zone continuation line in the tzdata that explicitly says that
> Australia/Sydney is always on standard time for the period 1895-02-01
> to 1917-01-01 and that the abbreviation is AEST (without any %s that
> needs to be expanded). So add the second line here:
>
> Z Australia/Sydney 10:4:52 - LMT 1895 F
>   10 - AEST 1917
>   10 AU AE%sT 1971
> R AU 1917 o - Ja 1 2s 1 D
> R AU 1917 o - Mar lastSu 2s 0 S
> R AU 1942 o - Ja 1 2s 1 D
> R AU 1942 o - Mar lastSu 2s 0 S
> R AU 1942 o - S 27 2s 1 D
> R AU 1943 1944 - Mar lastSu 2s 0 S
> R AU 1943 o - O 3 2s 1 D
>
> I'm sure this question could also be asked of many other zones,
> Australia/Sydney just happens to be the one I was testing with and
> noticed that my code couldn't expand the %s in "AE%sT".
>
> Am I missing something that says to use "S" as the LETTER/S field for
> dates prior to the first DST transition in 1917? What logic do other C
> libraries use to get "AEST" here?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mm.icann.org/pipermail/tz/attachments/20240430/e2c9f936/attachment-0001.html>


More information about the tz mailing list