Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!amdahl!chongo From: chongo@amdahl.amdahl.com (Landon Curt Noll) Newsgroups: comp.bugs.4bsd Subject: Re: ctime(3) and leap seconds :-( Keywords: ctime, leap second, epoch Message-ID: <20697@amdahl.amdahl.com> Date: 12 Jan 88 19:50:29 GMT References: <604@PT.CS.CMU.EDU> <6976@brl-smoke.ARPA> <20532@amdahl.amdahl.com> <175@wundt.psy.vu.nl> <1964@rti.UUCP> Reply-To: chongo@amdahl.amdahl.com (Landon Curt Noll) Organization: Amdahl Coup, UTS Products Hen House Lines: 45 In article <1964@rti.UUCP> trt@rti.UUCP (Thomas Truscott) writes: >Yes, 14 secs one way or another is no big deal. >So you won't care if someone fixes the leap-second bug in ctime, right? And by the same logic, you won't care if we all don't fix it, right? >DO NOT ATTEMPT TO FIX THE BUG BY DOCUMENTING IT! >We might document "ignore leap seconds" but that results in >small but very real errors that someday could cause real harm. But there exists software that would dislike to see: 23:59:60. That is an example of real harm NOW if we require a change or leave open the choice to vendors. If you leave it up to the vendors to fix or not fix time based on leap seconds, then you could be faced with synced machines on a localarea net converting into or out of timestamps differently. The 14 seconds between synced machines could be a non-trivial difference. Since the Earth is unlikely to obtain a boost of rotational energy, this difference is likely to increase in the future. :-) Or consider two machines from two different vendors: Vendor DOES Vendor DOESNOT ----------- -------------- keeps track of leap seconds does not keep track of leap seconds If I ask 'DOES' and 'DOESNOT' to give me the string produced by asctime(gmttime(some_fixed_timestamp)), I could get different values! If I ask them to convert the same ascii time string (assume it is GMT based time) into a timestamp, I could get different values! We have 3 main choices: 1) leave the timestamp conversion alone (>99% don't do leap seconds) 2) force systems to do leap seconds (a change with doubtful value transition problems and retroactive change problems) 3) allow systems to select their option (problems with synced systems) I vote for #1. chongo <> /\oo/\ -- [views above shouldn't be viewed as Amdahl views, or as views from Amdahl, or as Amdahl views views, or as views by Mr. Amdahl, or as views from his house]