Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.lang.c Subject: Re: Seconds from 19xx to Date (and visa versa) Message-ID: <7685@boring.cwi.nl> Date: 28 Oct 88 11:46:01 GMT Article-I.D.: boring.7685 References: <5522@hoptoad.uucp> <10030@socslgw.csl.sony.JUNET> <340@auspex.UUCP> Sender: news@cwi.nl Reply-To: guido@cwi.nl (Guido van Rossum) Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 24 Hmm. Leap seconds. My quartz watch doesn't understand them, and I can live with this. Every so often I resynchronize with a more accurate source of time. Since the prime reason for time calculations in operating systems is to use them for time stamps of files, not for calculating durations in the order of years accurately to the second, I propose that we define the time kept by Unix as follows: time = ( (number of whole years since the epoch) * 365 + (number of leap days since the epoch) ) * 24*3600 + (number of seconds since 00:00 this morning). This makes for easy, compact conversion between time stamp values and more conventional ways of displaying time. On the night of a leap second, we have an ambiguity lasting one second. Big deal. -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam guido@piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl@uunet.uu.net