The value for Jan. 1,1970 is used in some code in Appendix E of "Unix System Services File System Inteface Reference" in a subroutine named BPXTEPOC:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB5A0/E.6.2 The value in the word returned by this routine is in seconds-since-1/1/1970, but, unlike the value returned by the C library time() function and expected by localtime(), it includes leap seconds, so for current dates it is 24 seconds too high. The same applies to the logic posted earlier. That may or may not be ok for your purposes. At the end of June 2012 there will be another leap second. The results of localtime() or gmtime() will be that many seconds too high unless you adjust the result for leap seconds before calling those functions. The value is also used in the Rexx code at these links: ftp://ftp.boulder.ibm.com/s390/zos/tools/wjsip/wjsigamu.txt ftp://public.dhe.ibm.com/s390/zos/tools/wjsigshl/wjsigshl.txt Bill On Tue, 28 Feb 2012 18:48:25 -0800, Charles Mills wrote: >> Subtract TOD value for Jan. 1, 1970 > >Does anyone have a reference for that value? Yes, I could use CONVTOD and >yes I could calculate it but the former requires an hour or two of >programming and the latter has the potential to introduce one more variable. >The PoOp has the 1900 and 1972 values. > >Thanks, > >Charles > >-----Original Message----- >From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf >Of Paul Gilmartin >Sent: Tuesday, February 28, 2012 10:18 AM >To: [email protected] >Subject: Re: How convert "historic" STCK to local time? > >On Tue, 28 Feb 2012 09:57:44 -0800, Charles Mills wrote: > >>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? >> >Subtract TOD value for Jan. 1, 1970. > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN

