[LEAPSECS] Java: ThreeTen/JSR-310

Tom Van Baak tvb at LeapSecond.com
Fri Jan 28 00:33:35 EST 2011

Yes, we've been here before. Here are some comments to

There are many forms of "SLS"; from those that spread the
leap across one second, or two seconds, or 30 seconds or
a minute, or an hour, or a day. Spread it across a year (or
however long it's been since the last leap second) and you
have UT1. And that's just the versions of SLS that use linear
ramping. You can imagine nicer ones that take off and end
slowly instead of the abrupt quantum rate change as seen
in the utc-sls write-up. 1200 might make a better choice if
there are 50/60 Hz effects (1000 is not divisible by 60). Or
300. 1024 or a smaller power of 2 is nicer for low cost, low
power devices. 1200 has more common prime factors than
1000 which can come in handy in some cases. You get the
idea. Lots of ways to do it.

There are SLS where the leap is spread before midnight;
those where it's spread after midnight; and those where it
is evenly spread on either side of midnight.

All these share the same goal of maintaining exactly 86400
inexact seconds per day (something computer clocks are
good at). They also all avoid the dreaded 23:59:60 UTC label
so there's merit to smoothing as a general concept for almost
all timekeeping for human consumption. But as to how it is
implemented, or to what rigor, is totally dependent on the
needs of the user. Many NMEA outputting GPS receivers
have their own way of handling this just fine and it isn't the
way sls-utc is defined.

No quartz watch or any device using a 32 kHz-based RTC
is capable of faithfully implementing utc-sls(1000) because
they cannot implement millisecond leaps every second.

My point is dictating 1000 seconds as the smoothing interval
is a dated and arbitrary choice that's right in one person's
mind and for a particular point in computer history -- and a
poor engineering "choice" for everyone else; it's either way
too long or way too short or way too inconvenient or way too
proscriptive. You can smell something is wrong when you see
magic moments like "23:43:21" in the spec. Oh wait, I see it's
"23:43:19" for negative leap seconds.


More information about the LEAPSECS mailing list