Is there any straightforward way to convert an STCK value from some point in
the fairly recent (months, not decades) past to local time for the LPAR's
locale? By "straightforward" I mean without having to maintain my own table
of time changes for the historic period?

I know about CVTLDTO (and CVTLSO). They can be used to convert a "current"
STCK value to local time. But what about a time that might be hours, days,
or months in the past? (Of course, a nanosecond after you do an STCK it's a
historic value, so the problem always exists, but at least the window there
is fairly small.) For that matter, the same problem exists for leap seconds,
but at least there the variance is small and the historic changes
straightforward. (And No, I am not interested in revisiting the "what about
an STCK right at the leap second moment" thread from 2009.)

Why? Several types of data in z/OS have timestamps in raw STCK form, and
some customers want dates and times reported in a culturally comfortable
format. 

Environment is z/OS batch; language is XL C++. Correct me if I am wrong: it
appears to me that gmtime() converts *to* GMT but localtime() assumes the
time is already local.

Converting *to* gmtime is a tougher problem because 1:30 am on the morning
that we fall back to standard time is an ambiguous specification, is it not?

Charles 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to