Converting between time of day and date and TOD clock formats

You can use the STCKCONV macro to convert a TOD clock value to time of day and date, specifying the format in which the information will be returned. This conversion is useful, for example, for producing a report that requires the time and date to be printed in a certain format.

You can use the CONVTOD macro to convert a time of day and date value to TOD or ETOD clock format. The macro accepts a time of day and date value in any of the formats returned by the STCKCONV and TIME macros, and converts that value to either TOD clock format.

It is recommended that you begin to convert your applications to using the ETOD format. The extended time-of-day format was required both to address the time wrapping problem that would occur in the year 2042 and also to provide inproved resolution necessary for the faster processors as they become available.

Note that if you request ETOD information and your processor is not configured with the 128-bit extended time-of-day clock, timer services will return the contents of the 64-bit TOD and will simulate the remaining 64 bits of the ETOD. Conversely, if you request TOD information and your processor is configured with the extended time-of-day clock, timer services will return only that portion of the 128-bit ETOD that corresponds to the 64-bit TOD.