Path: utzoo!mnetor!uunet!husc6!hao!gatech!mcnc!decvax!decwrl!pyramid!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.bugs.4bsd Subject: Re: ctime(3) and leap seconds :-) Message-ID: <38768@sun.uucp> Date: 13 Jan 88 21:36:16 GMT Sender: news@sun.uucp Lines: 52 Keywords: ctime, leap second, epoch I decided to see what RFC 822 had to say, if anything, on the subject of representing dates. It says: 5. DATE AND TIME SPECIFICATION 5.1. SYNTAX date-time = [ day "," ] date time ; dd mm yy ; hh:mm:ss zzz day = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" date = 1*2DIGIT month 2DIGIT ; day month year ; e.g. 20 Jun 82 month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" time = hour zone ; ANSI and Military hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT] ; 00:00:00 - 23:59:59 The reference to 23:59:59 is in a comment, so it's not clear whether this means that 23:59:60 in an header would violate this specification or not. Section 2.8 "; COMMENTS" says A semi-colon, set off some distance to the right of rule text, starts a comment that continues to the end of line. This is a simple way of including useful notes in parallel with the specifications. which I infer means that it is a note, not a part of the specification. From that, I presume that it was assumed that everybody would know what the Right Thing to do was and that they'd do it, and no formal specification was necessary. I don't know if they took the possibility of leap seconds into account or not. RFC 822 also refers to the document ANSI. "Representations of Universal Time, Local Time Differen- tials, and United States Time Zone References for Information Interchange," X3.51-1975. American National Standards Insti- tute: New York (1975). I don't know if this document says anything about leap seconds or not, because I don't have a copy of it. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com