time zones, offtopic (Was: Various fixes for Celeste)

Jan Bottorff janb at pmatrix.com
Wed Dec 8 16:07:50 UTC 1999


I'm really pleased to see this group trashing about how to get time
represention "correct". I brought up the ugly issues of leap seconds and
such on a WinNT development list a while back and everyone thought I was nuts.

As leap seconds happen about avery 18 months, there are real world
applications that may require the correct time.

It's sure a LOT stickier problem that I ever thought.

I'm still not sure what the name for the moments during leap second changes
are. I was arguing we either must have times like 11:59:60 or else 11:59:59
must happen twice when leap seconds happen. Either of these is upsetting to
most developers simple view of time. Many developers seemed to be in
disbelief that some minutes could have 61 seconds.

One of the ideas we had was you should represent time as a (large) offset
AND some origin. This made time intervals and absolute time mesh much
better. Things that cared about the interval just looked at the offset
(with a common origin). Things that wanted to express the time in some
standard time system looked at the offset and origin.

I have no idea what to do about calculating correct UTC time into the
future, as you don't really know what the leap second adjustments will be
until they come near. How often leap seconds happen is influenced by the
earth rotation speed, which changes based on temperature and such things.
Because of this, I am convinced making your systemwide time reference be
UTC time is a terrible idea (this is what WinNT is supposed to do).

- Jan





More information about the Squeak-dev mailing list