Question

A "date" command on USS says:

Wed Jan 22 17:51:30 EST 2014

A couple of seconds later, a TSO TIME command says:

IKJ56650I TIME-04:51:58 PM. CPU-00:00:02 SERVICE-196896 SESSION-07:08:30 JANUARY 22,2014

(There's a one-hour time zone difference.) TSO TIME tracks, via eyeball, very closely to the time in system log entries. Any idea why the "date" command might be 28 seconds off?

Thanks.

No correct solution

OTHER TIPS

The difference is due to the handling of leap-seconds. Applications that merely access the hardware clock directly (STCK/STCKE instructions) often forget about leap-seconds, and so they will be off by about 30 seconds. Smarter apps use system time conversion routines that factor in leap-seconds automatically. Here's an example of how this happens: http://www-01.ibm.com/support/docview.wss?uid=isg1OA41950

Having said that, POSIX or the Single Unix Specification (which z/OS UNIX Services adheres to) may in fact specify the behavior of the "date" command. Here's what SUS says under "Seconds Since the Epoch":

A value that approximates the number of seconds that have elapsed since the Epoch...As represented in seconds since the Epoch, each and every day shall be accounted for by exactly 86400 seconds.

By my reading, the comment about every day having exactly 86400 seconds suggests that the UNIX specification intentionally does not want leap seconds counted. If this is the case, then IBM is merely following the letter of the law with respect to how the time is displayed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top