public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: newlib@sourceware.org
Subject: Re: Support non-POSIX TZ strings
Date: Mon, 14 Feb 2022 13:45:46 -0700	[thread overview]
Message-ID: <c2da566d-a99f-7ee2-b1eb-a2f3280b1315@SystematicSw.ab.ca> (raw)
In-Reply-To: <f2059b03-b05b-d942-85de-629bda48d3c7@jdoubleu.de>

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.

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.]

  reply	other threads:[~2022-02-14 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 13:21 jdoubleu
2022-02-14 17:10 ` Brian Inglis
2022-02-14 19:58   ` jdoubleu
2022-02-14 20:45     ` Brian Inglis [this message]
2022-02-14 21:33       ` Jeff Johnston
2022-02-15 22:02         ` Brian Inglis
2022-02-15 22:36     ` 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=c2da566d-a99f-7ee2-b1eb-a2f3280b1315@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=newlib@sourceware.org \
    /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).