std-unix@ut-sally.UUCP (Moderator, John Quarterman) (09/22/86)
[ I believe this is from Mark Crispin. -mod ] From: @SUMEX-AIM.ARPA:MRC@PANDA Date: Mon 15 Sep 86 10:32:48-PDT Postal-Address: 1802 Hackett Ave.; Mountain View, CA 94043-4431 Phone: +1 (415) 968-1052 Has anyone taken the effort to see how other operating systems handle this problem? If not, I'll throw one example I'm quite familiar with into the pot. TOPS-20 uses a 36-bit value for the time (after all it runs on a 36-bit machine). This is a fixed point number with the decimal point located between the halfwords expressing the number of days since midnight, 17 November 1858. Time -1 is reserved to mean "current time", therefore the latest representable time on TOPS-20 is 7 August 2576, one second before midnight. I guess sometime in August 2576 we'll have to fix TOPS-20 to add another word to the time! All this is in GMT, by the way, with no adjustments for leap seconds. Local time is strictly a user interface consideration. The default routines use the following cells to determine how to present the time: TIMZON The number of hours local time lags GMT. +12 and -12 are the same zone on different sides of the International Date Line DSTFLG Daylight Saving Time flag: NEVDST never use Daylight Saving Time ALLDST always use Daylight Saving Time 0 use algorithm DSTBGN The year in which the algorithm became effective DSTON The last day of the year on which DST may start DSTOFF The last day of the year on which DST may end The present algorithm starts on the Sunday preceeding DSTON and ends on the Sunday preceeding DSTOFF. It started in 1975, so it makes no attempt to handle the energy conservation rules of earlier years. The user interface will accept times in which no zone is specified ("GMT" or "PST" or "PDT", etc. will always override the TIMZON and DST flags) and convert them into the GMT representation. Times are output in the "current local timezone/DST" according to the rules unless written otherwise. This is all pretty minimal stuff. I think Unix should bite the bullet and use at least a 48 bit time representation. ------- Volume-Number: Volume 7, Number 3