On Fri, 13 Mar 2009 18:45:33 +0100, SCHARITZER Gerald wrote: > >In the "z/OS UNIX world" the time zone is specified in the TZ >environment variable. The information herein contains the UTC offset >plus DST rules. TZ remains constant, when switching to and from DST. It >only tells functions like localtime(), when to apply DST and when not. >This algorithm does not require periodic maintenance of local time. > Say that three times; it's true. Too many programmers suffer MVS tunnel vision and believe some maintenance is required at the DST boundary. In other operating systems, better designed IMO, it's unnecessary.
>In the "z/OS MVS world" the time zone is stored in CVTLDTO, which only >contains the UTC offset. This makes life easy for the TIME macro, which >simply adds the offset to UTC to obtain local time. However, CVTLDTO >does not remain constant throughout the year. Switching to and from DST >literally means to modify CVTLDTO accordingly. > >In order to keep z/OS UNIX and z/OS MVS local time in sync, CVTLDTO must >be adjusted at exactly those points in time, when the DST algorithm of >TZ kicks in. > "Exactly" matters. Is this serialized, or might the update of CVTLDTO occur a few microseconds away from that boundary, yielding invalid local times such as 2009-03-08 02:00:00.000001 or incorrect local times, such as 2009-11-01 02:00:00.000001 (which can only be Standard Time) when the Standard time was actually 01:00:00.000001. Such windows can be closed by saving the CVTLDTO value before the STCK and comparing the value after the STCK. And human beings want to see log timestamps in local time, but z/OS outside UNIX provides no facility for converting UTC to local time. >NTP considers only UTC and has nothing to do with local time, time zones >or daylight saving time. > >Both ETR and STP allow the specification of an ETS (external time >source), to automatically adjust the clock and/or the UTC offset. Again >this only modifies CVTLDTO and has no effect on TZ based time. > Alas, there are yet leap seconds, which affect NTP. Is NTP now leap second savvy, so it doesn't ring with damped oscillations for minutes after a leap second. I consider it a design blunder that the standards require computer systems to operate on UTC when UT1 is more practical. z/OS does its best to deal with leap seconds, and suffers for being better than most of the rest of the world. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html