Re: [HACKERS] Need confirmation of "Posix time standard" on FreeBSD

From: Malcolm Beattie <mbeattie(at)sable(dot)ox(dot)ac(dot)uk>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas Lockhart)
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Need confirmation of "Posix time standard" on FreeBSD
Date: 2000-02-07 15:12:08
Message-ID: E12Hppg-0004z6-00@sable.ox.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 shall be 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(at)sable(dot)ox(dot)ac(dot)uk>
Unix Systems Programmer
Oxford University Computing Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 2000-02-07 15:15:43 Re: [HACKERS] New Globe
Previous Message Don Baccus 2000-02-07 15:10:35 Re: [HACKERS] ONLY