From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,cd35c069ae659c58 X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,cd35c069ae659c58 X-Google-Attributes: gidfee84,public X-Google-Thread: 1014db,cd35c069ae659c58 X-Google-Attributes: gid1014db,public X-Google-Thread: f678f,cd35c069ae659c58 X-Google-Attributes: gidf678f,public From: msb@sq.com (Mark Brader) Subject: Re: gmtime(): Doesn't account for leap seconds?! Date: 1996/04/25 Message-ID: <1996Apr25.082458.6446@sq.com>#1/1 X-Deja-AN: 151341705 references: <4lid0q$itq@jik.israel.net> <830348597snz@genesis.demon.co.uk> <4lm62r$edg@nntp.Stanford.EDU> organization: SoftQuad Inc., Toronto, Canada newsgroups: comp.unix.osf.misc,comp.unix.osf.osf1,comp.unix.programmer,comp.lang.c Chuck Karish (karish@pangea.Stanford.EDU) writes: > POSIX.1 says that time() returns the number of seconds since the > Epoch (4.5.1.2), and gives an algorithm relating the result to UCT that > ignores leap seconds (2.2.2.77). Use of this algorithm by the > time manipulation functions of the C Standard is mandated in 8.1. I may as well point out again that these requirements are mutually contradictory. As soon as you talk specifically about UTC rather than some other flavor of UT, you are requiring leap seconds to be taken into account. However, I'm informed that the intent clearly was to require that they be ignored. Someone else asked when leap seconds happen. There is not a pre-set schedule; it depends on the measured rotation of the Earth. At the moment they tend to be roughly every 2 years. -- Mark Brader, msb@sq.com "Logic is logic. That's all I say." SoftQuad Inc., Toronto -- Oliver Wendell Holmes My text in this article is in the public domain.