[tz] Extra transition for Europe/London with 2023d
Brooks Harris
brooks at edlmax.com
Fri Jan 5 23:16:46 UTC 2024
On 1/5/2024 2:31 PM, Paul Eggert wrote:
> On 2024-01-02 13:53, Brooks Harris via tz wrote:
>> I suggest TzDb may want to have a look at this topic. I think If
>> these improvements were made it would not alter the typical current
>> behavior of localtime(); the YMDhms representations and sequences
>> would remain the same. But the addition of these transitions are more
>> complete and honest to the underlying TzDb source data and this is
>> important for some types of extended functionality I'm pursuing.
>
Thanks for looking at this.
> It's never been a goal of zic to pack as much as possible information
> about the input into the TZif binary output file. Instead, the goal
> has been to optimize the output file size, as long as optimization
> doesn't change localtime's behavior.
Yes, I understand, I think. But I think these "first of year"
transitions should be included in TzIf. They are important to the
objectives I'm pursuing because they contain the critical STDOFF shifts
that are not included in the normal outzone() output. I'm including both
STDOFF and DST transitions in my resulting timestamp formats.
> (Look for the word "optimize" in zic.c for more about this.)
Yes, I'm familiar with that code block, and it too needs a bit of
modification to retain these transitions.
>
> It might be possible to add a flag to zic to tell it to output larger
> TZif files that contain transitions and other information that do not
> affect localtime but might aid other applications.
I think that's what I'm suggesting, although I'm not using the zic.c
main() command params; I've got it more "hard coded". I suppose other
users would like the option, although it would not change the behavior
of localtime().
> However, I don't see how such a flag could preserve all the relevant
> information, without a change to the TZif file format.
True, and I'm not suggesting TZif format should change, only that these
transitions be retained.
There aren't actually very many, though I've not done a full tally. But
there's only 1 in London, 5 in New York, 1 in Sydney, etc. I think this
would be a very small increase in the TzIf files size.
> So unless we change the TZif format, users who want all the info in
> the .zi input files would need to look at the .zi files anyway.
Yes, that's what I'm doing, actually looking at the output of infile(),
that is, the struct zone and struct rule sets that outzone() is
processing to pick up the additional data, mostly the STDOFF shifts.
If you want to investigate this further I'd be happy to go into more detail.
Thanks,
-Brooks
More information about the tz
mailing list