Basically one needs to know if there is a leap second about to occur at the end 
of the month
and direction and if you are in a leap second. That can be encoded in two bits.

00      no leap at end of UTC month
01      in additive leap second at end of UTC month
10      subtractive leap at end of UTC month
11      additive leap at end of UTC month

This allows you to detect when :59 (60th second) does not exist and to detect 
when
you are in :60 (61st second) provided your system provides access to the 
information.

When calculating deltas across the end of a UTC month you use the information 
from the
earlier timestamp to compute the correction as there can be leap seconds in two 
consecutive
months.


> On 27 Nov 2018, at 1:54 am, Tony Finch <d...@dotat.at> wrote:
> 
> Richard Gibson <richard.j.gib...@oracle.com> wrote:
>> 
>> I am currently going through a similar exercise in another context, and the
>> best current text there explicitly characterizes the non-obvious day-based
>> accounting of POSIX time.
> 
> In general I think it's best to just refer to POSIX on this matter, and
> not try to restate the definition. POSIX is very clear and explicit about
> the day-based accounting of seconds.
> 
> http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/basedefs/V1_chap04.html#tag_04_16
> 
>> However, there may be C-DNS purposes that cannot tolerate such
>> discontinuities, and they would presumably want to use a continuous monotonic
>> timescale with a fixed offset from TAI (as is the case for e.g. GPS time).
> 
> That's practically unobtanium on most systems :-) Even if you have PTP
> there isn't a fixed PTP epoch, though the SMPTE profile defines it to be
> equivalent to POSIX time plus the TAI-UTC value from the IERS / NIST
> leapsecond tables.
> 
> Tony.
> -- 
> f.anthony.n.finch  <d...@dotat.at>  http://dotat.at/
> disperse power, foster diversity, and nurture creativity
> 
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop

-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: ma...@isc.org

_______________________________________________
DNSOP mailing list
DNSOP@ietf.org
https://www.ietf.org/mailman/listinfo/dnsop

Reply via email to