STCKCONV and CONVTOD are both provided macro services to translate between STCK 
values and various date/time formats 

Rob Scott
Lead Developer
Rocket Software
275 Grove Street * Newton, MA 02466-2272 * USA
Tel: +1.781.684.2305
Email: [email protected]
Web: www.rocketsoftware.com


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Charles Mills
Sent: 28 February 2012 17:58
To: [email protected]
Subject: How convert "historic" STCK to local time?

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 
[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