Article View: comp.unix.programmer
Article #313Re: Need (today's date - 2 WORKING days) [was: Need (today's date + [1-7]]
From: Guy Harris
Date: Tue, 04 Aug 1992 21:46
Date: Tue, 04 Aug 1992 21:46
34 lines
2087 bytes
2087 bytes
>>Of course, POSIX 1003.1 decreed that leap seconds shall not be honored, >>so.... > >Does this mean that a POSIX-compliant machine should hang between 24:00 >and 00:00? No. POSIX-compliant machines "fundamental" notion of time is represented by the number of seconds since January 1, 1970, 00:00 UTC; that notion is completely independent of leap seconds. The notion affected by 1003.1's decree is the notion of "local" time, as produced by the "localtime()" routine; that routine has to act as though leap seconds didn't exist, which means that the value of local time it returns must differ from the correct value by a number of seconds dependent on the number of extra seconds added/subtracted since January 1, 1970, 00:00 UTC. >What if this machine happens to be doing something that is >very time-critical? Depends on what you mean by "time-critical". Since, as should have been obvious, it doesn't "hang", it should be just as able to respond to events (modulo differences in load, etc.) as it could at other times (given that 1003.1 makes no committments as to how responsive a 1003.1 system is as a real-time system - for obvious reasons - how well it will respond to those events depends on the system). If "time-critical" means that it's critical that it be able to get proper time stamps, with leap seconds taken into account, a program running on a POSIX-compliant system will have to do its own leap-second correction; it won't be able to just use "localtime()" to get the time stamp without doing extra correction work on it.
Technical Details
Message-ID:
<13891@auspex-gw.auspex.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!auspex-gw!guyReferences:
<BsEDxv.85I@cck.coventry.ac.uk> <13873@auspex-gw.auspex.com> <MELBY.92Aug4104715@dove.yk.Fujitsu.CO.JP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!auspex-gw!guy From: guy@Auspex.COM (Guy Harris) Newsgroups: comp.unix.programmer Subject: Re: Need (today's date - 2 WORKING days) [was: Need (today's date + [1-7]] Message-ID: <13891@auspex-gw.auspex.com> Date: 4 Aug 92 21:46:57 GMT References: <BsEDxv.85I@cck.coventry.ac.uk> <13873@auspex-gw.auspex.com> <MELBY.92Aug4104715@dove.yk.Fujitsu.CO.JP> Sender: news@auspex-gw.auspex.com Organization: Auspex Systems, Santa Clara Lines: 34 Nntp-Posting-Host: bootme.auspex.com