Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.JUNET (Norman Diamond) Newsgroups: comp.lang.c Subject: Re: Seconds from 19xx to Date (and visa versa) Message-ID: <10030@socslgw.csl.sony.JUNET> Date: 6 Oct 88 01:47:15 GMT References: <5522@hoptoad.uucp> Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 20 In article <5522@hoptoad.uucp>, pozar@hoptoad.uucp (Tim Pozar) writes: > Does anyone have a routine to change back and forth between > seconds from 19xx to a Year, Month, Day sort of Date? You need more than a routine to do this. You need a database of when leap seconds have occurred. Sometimes on June 30th or December 31st, the last minute runs from 11:59:00 to 11:59:60 (sixty-one seconds) in order to compensate for wobbles in the earth's rotation. These do not happen as regularly as leap days, so their occurrences cannot be computed by a a routine; you need a database. (The dpANSI C standard had the field for seconds redefined to allow a value of 60 for exactly this reason. I proposed the same correction to the committees standardizing Extended Pascal.) -- ------------------------------------------------------------------------------- The above opinions are my own. | Norman Diamond If they're also your opinions, | Sony Computer Science Laboratory, Inc. you're infringing my copyright. | diamond%csl.sony.jp@relay.cs.net