Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/time



On Thu, Oct 29, 2015 at 06:38:48PM -0800, Warner Losh wrote:
> 
> > On Oct 29, 2015, at 8:06 PM, Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
> > 
> >    Date:        Fri, 30 Oct 2015 01:49:36 +0000
> >    From:        "Brian Ginsbach" <ginsbach%netbsd.org@localhost>
> >    Message-ID:  <20151030014936.3FD4698%cvs.netbsd.org@localhost>
> > 
> >  | Reject timezone offsets more than 12 hours (east or west).
> > 
> > That's definitely incorrect.
> > 
> > andromeda$ TZ=Pacific/Auckland date +"%c %z"
> > Fri Oct 30 15:04:08 2015 +1300
> > 
> > That's right now (or a minute or two ago).
> > 
> > Offsets of +1400 have been seen as well, and +1500 isn't out of the
> > question.   I'm not sure if -1300 has ever been used, but probably.
> > 
> > If you need limits, limit it to +/- 2400
> 
> The problem is that the international date line doesn?t follow
> 180E exactly. There?s deviations and some islands are a day
> ahead of where they?d otherwise be. And these move from
> time to time. Apia in Samoa is GMT+1400. Pago Pago, just a
> few miles away is GMT-1300.
> 
> As I write this it is Fri Oct 30 at 4:37pm in Apia and The Oct 29
> at 3:37 in Pago Pago.
> 
> A limit of +/- 1200 is totally bogus. Time doesn?t work that way.
> 

No not totaly bogus if you equate 12 hours with 15 degrees of
longitude.  This means that given a fixed reference, i.e. prime
merdian, that no place would be further than 12 hours ahead or
behind.

More investigation and direct evidence have proven that the above
logic falls down because of the peculiarities of the time zone
conventions especially relating to the international date line.

It also proves that it is best not to trust other implementations
without doing more research.

Briaan


Home | Main Index | Thread Index | Old Index