Re: Date Trivia
Posted in 1993
In article <1q1hp3INN3f0@emory.mathcs.emory.edu> alan@effluvia.den.mmc.com (Alan Popiel) writes: >I know you are being facetious, BUT... >The algorithm you are asking for should also provide for leap-seconds. ANSI kind of provides for this: Note: On occasion, UTC is adjusted by the omission of a second or the insertion of a "leap second" in order to maintain synchro- nization with sidereal time. This implies that sometimes, but very rarely, a particular minute will contain exactly 59, 61, or 62 seconds. and Note: Datetime data types will allow dates in the Gregorian format to be stored in the date range 0001-01-01 CE through 9999-12-31 CE. The range for SECOND allows for as many as two "leap seconds". Interval arithmetic that involves leap seconds or discontinuities in calendars will produce implementation- defined results. 5.0's "implementation-defined result" is that if you try to define anything but 60 seconds to a minute, it will slap you silly. [-: Are any UNIX versions set up to automatically handle leap seconds? After all, we get our time from the O/S. (e.g. we don't provide device drivers to use an atomic clock as an OnLine chunk). -- Alan Denney aland@informix.com {pyramid|uunet}!infmx!aland "We must learn to live to live together as brothers or we shall perish together as fools." -- Dr. Martin Luther King, Jr.