Paul Saers wrote

<begin insertion>
If you really want to cover all time stamps, then you must also cover
the sporadic insertions of leap seconds just before midnight 1Jan or
1July.
</end insertion>

The z/Architecture TOD clock provides values trhat are analogous to
International Atomic Time, TAI, ones, which are innocent of
leap-second corrections.  UTC values do contain these corrections, and
IBM provides facilities for incorporating their then current net
effect in any notional STCKE value (or not).

Time services coordinated by the BIPM chiefly, but not quite
exclusively, provide UTC not TAI values.  If you want an RYO facility
for including net leap-second effects, a simple GLB-seeking
binary-search scheme (NOT a match-seeking one) can be used in a table
of STCKE values and leap-second corrections---Search on STCKE value,
extract the corresponding additive correction---can be  used to
provide it.  Most people most of the time should use one of the
IBM-supplied facilities instead, leaving table maintenance to it.
Care is required because this sequence of corrections in not a
monotone increasing one.  (Single corrections can be either positive
(usually) or negative (infrequently but very likely in the near-term
future).

Yesterday I quoted Wittgenstein's apophthegm,

About things we know not, we ought to be silent.

There is a more abrasive variant of the same principle that is due to
one of our own.  The late John McCarthy wrote

Do the math or shut up.


John Gilmore, Ashland, MA 01721 - USA

Reply via email to