Hercules emulates the TOD clock, so what you see is Hercules behaviour and
not the real hardware behaviour for any particular machine type.
Additionally current releases of Hercules include support for emulating the
IBM TOD clock steering facility.  So Hercules will steer the emulated TOD
clock to the value of the synchronization time -- presumably the time set
in the host Linux system.  I doubt that there is any ETR or STP capability
though the Linux clock is generally synced to NTP, which is "close
enough".  Bottom line is that the steering takes care of leap seconds and
you'd have to catch a steering window as a leap second occurred in real
time to see it.

On Thu, Nov 12, 2020 at 2:13 PM Rupert Reynolds <[email protected]> wrote:

> I did look for IBM docs online, but I haven't found anything very helpful.
>
> I read of someone using STCK and converting (the hard way!) to display
> time, instead of using TIME DEC. So I tried it on my Hercules/MVS 3.8
> setup.
>
> I was expecting to have to account for all the leap seconds since 1972. I
> mean that a hypothetical system running for decades would presumably have
> been running its TOD clock during leap seconds.
>
> I'll improve the code to print out the exact difference, but should I
> expect any difference, or have I made a mistake?
>
> As a quick check, I used TIME STCK, did the equivalent of a shift right by
> 12 bits and dividing by (1,000,000*3600*24) for days, subtracted 28 leap
> days and then divided by 365 for years. UNPK the remainder for days.
>
> I left this running overnight, looping roughly twice a second. I expected
> my date from STCK to change sooner than TIME DEC by a few seconds due to
> leap seconds since 1972, but it matched all night, including midnight.
>
> Perhaps the TOD clock is slowed or stalled for leap seconds, to keep
> TOD-derived date and time in synch with solar time?
>
> It's amazing how much detail there is.
>
> Roops.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

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

Reply via email to