Thomas Lockhart writes:
> > I can confirm that it is a POSIX standard. Section 8.1.1 "Extensions
> > to Time Functions" of POSIX 1003.1-1988 says TZ can be of the form
> > :characters
> > for implementation-defined behaviour or else
> > std offset [dst [offset][,start[/time],end[/time]]]
> > (spaces for readability only) where std is three or more bytes
> > designating the standard time zone (any characters except a leading
> > colon, digits, comma, minus, plus or NUL allowed) and offset is the
> > value one must add to the local time to arrive at Coordinated
> > Universal Time. offset is of the form hh[:mm[:ss]] with hh required
> > and may be a single digit. Followed by gory details about the rest of
> > the fields. Phew.
>
> Thanks for the info. How do they define "the standard time zone"? Is
> it *any* time zone, or "GMT", or some other set of choices?
It's "standard" in the sense of not-summer/not-daylight-savings rather
than in the "POSIX compliance" sense. In other words, std can be any
three bytes you like subject to the not-leading-colon, not-digits etc.
constraints above. Later in the section it says that summer time is
assumed to be one hour ahead of standard time if no offset follows
dst. Also, If [an offset is] preceded by a "-"; the time zone shall be east of the Prime Meridian; otherwise it
shallbe west (which may be indicated by an optional preceding "+").
That's the bit which shows that the "+" is OK. Aha, but I've just
looked back at your original message and it refers to "GMT+0800"
whereas POSIX requires a ":" between the hours and minutes. So in
fact, "GMT+0800" is *not* legal and it should be "GMT+08:00" or
"GMT+08" or "GMT+8" (single digit hours are allowed).
--Malcolm
--
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services