Millisecond clock resolution for DateAndTime now

Bruce O'Neel edoneel at sdf.lonestar.org
Mon Sep 27 12:22:27 UTC 2004


Hi,

Info about time systems in general is at:

http://tycho.usno.navy.mil/

There is some talk (well, a lot of talk, hours and hours and hours of
talk) about getting rid of this system anyway.  First, the earth is
basically speeding up.  The length of day (should be 86400 secs) is
now less than 1 ms longer than that, and getting smaller.  If the
earth keeps this up we will have to have a negative leap second and
that's expected to cause, um, problems, with some software systems
that never thought that to be a signed number.  The proposal is
basically to define away the problem, produce yet another new time
system, and get rid of UTC.

Rather than bore all of you, much more info about this can be found at:

http://www.ucolick.org/~sla/leapsecs/dutc.html

and an overall bibliography can be found at:

http://www.ucolick.org/~sla/leapsecs/onlinebib.html

Of course, this is just to get from some invariant time to
UTC, and says nothing about converting to a time offset where
the sun rises sometime when the clock reads between 5 and 8 and 
sets sometime between when the clock reads 16 and 22. That is just
a simple political problem :-)

cheers

bruce



On Mon, Sep 27, 2004 at 06:30:51PM +1200, Richard A. O'Keefe wrote:
> Tim Rowledge <tim at sumeru.stanford.edu> wrote:
> 	Now here's a thought - do all OSs (any) successfully deal with those 22
> 	or so leap seconds? Are they algorithmic or declared by fiat? 
> 	
> Leap seconds are not algorithmic.  They are based on the actual rotation
> of the earth, which is not predictable to that level.  So they are
> declared by fiat, but are not totally arbitrary.
> 
> This means that accurate-to-within-one-second timestamps in the future
> are IMPOSSIBLE to calculate.  I mean that
>     "CalendarWithLeapSeconds now addSeconds: (183*24*60*60)"
> is IMPOSSIBLE to determine; there might be a leap second within the
> next six months, and then again, there might not be.  What's more,
> even if the rotation of the earth might justify it, there might be a
> revolt in timekeeping standards and the relevant body might no longer
> exist or might decide not to decree one.  It's impossible to predict.
> 
> The POSIX standard deals with the issue by explicitly refusing to
> acknowledge leap seconds.  In effect, if a six month period contains a
> leap second (and it will contain at most one), the POSIX calendar for
> that period contains one second that is twice as long as the others.
> (Which makes "millisecond accuracy" for that period rather, um,
> interesting to contemplate.)
> 
> Note also that leap seconds have been around for less than 50 years
> and when a committee of experts was asked whether they'd still be used
> in 50 years half said yes and half said no.
> 
> Sooner or later someone is going to propose using self-levitating
> electric cables in some way to make the Earth a better clock...
> 
> 

-- 
edoneel at sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



More information about the Squeak-dev mailing list