A step in deriving GMT from TOD is to subtract CVTLSO.  I assume the TIME
macro does this.  And user processes are made non-dispatchable curing a
leap second for timestamp consistency.

But I imagine a remaining race condition.  If CVTLSO is accessed and STCK
is issued on opposite sides of a leap second, the derived GMT can be in
error by nearly a second.  That could be avoided by:
TRY  fetch CVTLSO
     STCK
    compare fetched value to CVTLSO
    BNE TRY

Two additional instructions for a hazard that occurs only every few months.
Does TIME macro do that?  Is there a better way?

Good practice might be to store not GMT but TOD in critical data bases
and to derive GMT only for reports.  That requires CVTLSO at the time of
the event.  That's in the PoOps, but can report generators be updated
in timely fashion?

There's an active discussion of leap seconds and the Sunshine Protection Act on
<https://lists.iana.org/hyperkitty/list/[email protected]/>

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to