[LEAPSECS] USWP7A docs for 2013 September meetings
Stephen Colebourne
scolebourne at joda.org
Thu Aug 15 03:23:17 EDT 2013
On 14 August 2013 19:24, Hal Murray <hmurray at megapathdsl.net> wrote:
>
>> The approach of smothing any leap is what Java version 8 will be defined
>> using (which is a definition that also handles abolition of leaps, should
>> that occur).
>
> Is there a way to ask for the non-smoothed time?
>
> Will the smoothing recipe be standardized or does each OS/library get to do
> it their own way?
The answer is complicated.
We define a Java time scale that equates to UTC-SLS. Clocks are
supposed to follow the time-scale. As such, if you have separate
knowledge of leap seconds, then you can reverse engineer the actual
leap second. There is no direct way to get non-smoothed time (we
considered such approaches but felt that too few users actually care
about leapsecs to justify it)
However, the underlying clock that Java currently has is completely
ill defined wrt leap seconds. As such, there is no way to provide an
implementation at the higher level that accurately implements the
spec. This is of course weird, although most people just don't care.
What users can do is implement their own clock. If they have access to
a leap-second aware time source, then they can accurately implement
the Java time-scale.
Potentially, a future version of Java might provide a more accurate
low-level clock if the OS has one, which would allow the spec to be
correctly implemented.
Stephen
More information about the LEAPSECS
mailing list