Re: Support non-POSIX TZ strings
Jeff Johnston <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAOox84scni-YpFZth-pe+W7bowWLUTRLh2sLTQ--AQNojM69VQ@mail.gmail.com> |
On Mon, Feb 14, 2022 at 3:46 PM Brian Inglis < [email protected]> wrote: > On 2022-02-14 12:58, jdoubleu wrote: > > On 22-02-14 10:10-0700, Brian Inglis wrote: > > >> [..] but we should start with the actual POSIX spec under TZ > > > Yes, that is exactly what I meant: Newlib supporting the <> (angle > > brackets) syntax. > > I didn't know that it was actually part of POSIX spec, since so many > > libs actually don't implement it. > > Most should have by now if maintained: we should be a laggard! ;^> > > >> The BSD or TZcode implementations could probably be adapted [..] > > > It looks like the TZcode implementation by Paul Eggert uses a different > > approach to parsing the strings, than the current implementation in > > newlib > > ( > https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/time/tzset_r.c). > > > I'm not sure, if you want to copy the code over or use changes by e.g. > > Earle F. Philhower from > > https://github.com/earlephilhower/newlib-xtensa/pull/14. > > Because of the above question, I'm not sure how to continue on this. I > > would like to contribute myself and submit an implementation, but I'll > > wait for feedback by other maintainers, first. > > Upstream sources like BSDs or TZcode official reference implementations > are normally preferred because they are feature complete, regularly > maintained, feature test and standards compliant, vulnerabilities > checked, issues reported, and promptly fixed. > > I checked the BSDs and they seem to have adopted or adapted the TZcode > official reference implementation, so I am not sure from where it may > have been adopted, or whether it is original: the maintainer Jeff > Johnson may remember. > Unfortunately, I do not remember the exact details from back then. With no license header, it means it was written by Cygnus/Red Hat. > I also wonder if the GMT defaults should be updated to UTC. > > -- > Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada > > This email may be disturbing to some readers as it contains > too much technical detail. Reader discretion is advised. > [Data in binary units and prefixes, physical quantities in SI.] > >