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 10:27:48PM -0600, Warner Losh wrote:
> On Thu, Oct 29, 2015 at 9:06 PM, Brian Ginsbach <ginsbach%netbsd.org@localhost> wrote:
> 
> > 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.
> >
> 
> Timekeeping is complicated. A lot more complicated than you might
> think approaching the topic new.

Very well aware that it is very complicated especailly with regards
to civil time keeping.  The crazy way which time zones have changed
over time is especially vexing.

The above, 12 hour limit, applies to nautical and military time
zones (A-I,K-Z) as these are limited to +12/-12.  The mistake was
not taking into account that ISO 8601 and RFC 3339 allow for offsets
of 23:59.  As you've probably seen the mistake has been corrected.

> 
> https://www.youtube.com/watch?v=-5wpm-gesOY
> 
> is an excellent resource for all the insanity that goes on with time zones
> and how what you think you know about time zones is likely wrong.
> They are not all one hour increments. They aren't even in 15 minute
> increments. There are regions of the world where different timezones
> occupy the same physical space. And there's offsets greater than 12 hours
> from UTC. Heck, there's some that are more than an hour off from
> the 15-degree offset you'd expect, some several hours.
> 

Good video but doesn't present anything new to me.

Brian


Home | Main Index | Thread Index | Old Index