[tz] zic changes (2/2)
Paul Eggert
eggert at cs.ucla.edu
Thu Mar 3 02:08:30 UTC 2016
Brian Inglis wrote:
> On 2016-03-02 16:19, Ian Abbott wrote:
>> On 03/02/16 23:02, Paul Eggert wrote:
>>> The TZ string "PST+8PDT" doesn't conform to POSIX,
>> It doesn't?
>
> It does appear to conform - see:
>
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
It "conforms" in the sense that its syntax matches the POSIX spec. However, no
semantics are specified by POSIX for what daylight-saving rules are in effect
when TZ="PST+8PDT" is in the environment. Glibc is within its rights, for
example, to assume that DST in effect only one second during the year -- or even
not in effect any time.
I vaguely recall older versions of POSIX not allowing the syntax "PST+PDT",
though I could be wrong. I imagine the current POSIX spec is simply a typo,
since I can't imagine that it's intended for users to employ a syntax whose
semantics are unspecified.
Also, I think it's a glibc bug, in the sense that I don't think the current
behavior is intended by the glibc maintainers. Still, portable programs
shouldn't use TZ="PST+8PDT" or TZ="PST8PDT" or anything like that.
More information about the tz
mailing list