public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
To: cygwin-apps@cygwin.com
Subject: Re: [tz] Ubuntu drops old-style links
Date: Sat, 23 Mar 2024 12:54:04 -0600	[thread overview]
Message-ID: <c7408a3e-86d1-43d3-b044-92c3655a5142@SystematicSW.ab.ca> (raw)
In-Reply-To: <a2cb9a61-2434-4093-8833-c89d22f8b0f7@SystematicSW.ab.ca>

[-- Attachment #1: Type: text/plain, Size: 4027 bytes --]

On 2024-03-23 10:38, Brian Inglis via Cygwin-apps wrote:
> On 2024-03-23 03:54, Corinna Vinschen via Cygwin-apps wrote:
>> On Mar 22 10:02, Brian Inglis via Cygwin-apps wrote:
>>> On 2024-03-21 03:36, Corinna Vinschen via Cygwin-apps wrote:
>>>> We're generating the conversion from Windows to POSIX timezone via
>>>> the conversion table from unicode.org:
>>>>
>>>> https://cygwin.com/cgit/newlib-cygwin/tree/winsup/utils/tzmap-from-unicode.org
>>>>
>>>> Plus a few (7, actually) mappings the Unicode consortium missed in
>>>> the list (or maybe they are available in the meantime, needs checking).
>>>> This is the minimum list of timezone info we need in the tzdata DB.
>>>
>>> I generated tzmap.h and generated differences since the last update cldr ~40.
>>> I also searched in the latest for matches for each field attached as first.
>>>
>>> I do not know if they will be of help as I see you have already looked at tzmap.
>>>
>>> It looks as if the match might better prioritize country code over Windows 
>>> label.
>>
>> Which match?  I'm not sure what you're trying to tell me.
>>
>> Basically, we want to generate a POSIX timezone from the current user's
>> Windows timezone.  This boils down to four questions:
>>
>> - Is the creation of tzmap.h from unicode.org via the
>>    tzmap-from-unicode.org script the right thing to do or not?
>>
>> - If it's the wrong thing to do, what other source do you propose and do
>>    you have a script to perform the conversion from this source to a
>>    valid tzmap.h file?
>>
>> - Otherwise, is the current tzmap-from-unicode.org right or wrong in
>>    adding these old extra timezone/territory settings, or is even
>>    some combination missing?
>>
>> - If so, would you mind to send a patch to fix tzmap-from-unicode.org
>>    accordingly?
> 
> I have a decent background in tzdata, but little in Windows or CLDR, although at 
> least information from the latter can be extracted from GitHub.
> 
> It looks to me that tzset.c prioritizes the Windows label over the country, and 
> it may be a better match prioritizing the country over the label, if the country 
> is not 001/"", nor ZZ, which are the generic entries.
> 
> It also is not clear what tzset should do when tzmap has a list of zones to 
> choose from, for example:
> 
>    { L"Mountain Standard Time", L"CA", L"America/Edmonton America/Cambridge_Bay 
> America/Inuvik" },
>    { L"Mountain Standard Time", L"US", L"America/Denver America/Boise" },
>    { L"US Mountain Standard Time", L"CA", L"America/Creston America/Dawson_Creek 
> America/Fort_Nelson" },
> 
> it currently just prints the first, but perhaps it should print all relevant 
> entries and the caller should handle the alternatives?
> 
> There also seem to be issues with CLDR data:
> 
>      https://postgrespro.com/list/thread-id/2571399
> 
> not to mention the delays in updating Windows and CLDR data:
> 
>      2021 Samoa DST change in 2024 March/April Windows updates
> https://techcommunity.microsoft.com/t5/daylight-saving-time-time-zone/interim-guidance-for-samoa-dst-changes-2021/ba-p/4048965
> 
>      Intermittent updates from tzdata and Windows
> https://github.com/unicode-org/cldr/commits/main/common/supplemental/windowsZones.xml
> 
> plus they no longer seem to be updating the tzdata version in that file since 
> 2021a.

 From the point of view of tzdata, given most zones are required in tzmap for 
tzset to use, we can not reduce much there: see tzmap summary attached.

So the only significant reductions we can make by splitting are with the right 
and posix subtrees, perhaps in two or a single extra package: see zi summary.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

[-- Attachment #2: tzmap-sum.log --]
[-- Type: text/plain, Size: 259 bytes --]

    tzmap total extra
pri 1  87/ 91      4 zones src zonenow.tab
pri 2 210/221     11 zones src zone1970.tab 
pri 3 101/132     31 zones src backzone 
pri 4  19/113     94 zones src backward 
pri 5  32/ 41      9 zones src files 
total 449/598    149 zones 


[-- Attachment #3: zi-sum.log --]
[-- Type: text/plain, Size: 99 bytes --]

1.8M	/usr/share/zoneinfo/posix
2.4M	/usr/share/zoneinfo/right
2.8M	/usr/share/zoneinfo/
6.9M	total

  reply	other threads:[~2024-03-23 18:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKxAwDomYU4=EOyMXTUcgDQJp0k7jQncRSChGB86xHT+9+hucA@mail.gmail.com>
     [not found] ` <86ff5be5-ccae-4bc0-81af-46abc54e549d@systematicsw.ab.ca>
2024-03-20 20:59   ` Fwd: " Brian Inglis
2024-03-21  9:36     ` Corinna Vinschen
2024-03-22 16:02       ` Brian Inglis
2024-03-22 20:02         ` Brian Inglis
2024-03-22 20:10         ` Brian Inglis
2024-03-23  9:54         ` Corinna Vinschen
2024-03-23 16:38           ` Brian Inglis
2024-03-23 18:54             ` Brian Inglis [this message]
2024-03-23 21:11             ` Corinna Vinschen
2024-03-28  8:25               ` [tz] Ubuntu drops old-style links - tzdata split test package Brian Inglis
2024-03-28 10:13                 ` Corinna Vinschen
2024-03-28 18:35                   ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c7408a3e-86d1-43d3-b044-92c3655a5142@SystematicSW.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).