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: f678f,cd35c069ae659c58 X-Google-Attributes: gidf678f,public X-Google-Thread: 1014db,cd35c069ae659c58 X-Google-Attributes: gid1014db,public X-Google-Thread: fee84,cd35c069ae659c58 X-Google-Attributes: gidfee84,public From: jik@annex-1-slip-jik.cam.ov.com (Jonathan Kamens) Subject: Re: gmtime(): Doesn't account for leap seconds?! Date: 1996/04/24 Message-ID: <4lltpp$een@jik.israel.net>#1/1 X-Deja-AN: 151222888 sender: jik@jik.israel.net (Jonathan Kamens) references: <4lid0q$itq@jik.israel.net> <830348597snz@genesis.demon.co.uk> organization: jik's Linux box newsgroups: comp.unix.osf.misc,comp.unix.osf.osf1,comp.unix.programmer,comp.lang.c In article <830348597snz@genesis.demon.co.uk>, Lawrence Kirby writes: |> However ANSI C doesn't define the representation of a |> time_t value whereas POSIX, to a great extent, does. I don't know the |> exact details but it would be that definition that prevents leap seconds |> being supported. Yes, I believe that's where it occurs. I believe that it specifies the algorithm by which a time_t value is converted to a date, and that algorithm assumes that time_t 0 is 1/1/1970 00:00:00 GMT and that time increases in sixty-second minutes from that point forward forever. |> LINUX is supposedly POSIX compliant. Then by your argument above its standard |> library cannot support leap seconds at least not when used in a POSIX |> conforming mode. LINUX isn't "POSIX-complaint", per se, since only one Linux distribution (Linux-FT) has been tested for compliance, and that distribution made numerous changes to standard Linux software in order to obtain compliance. It's entirely possible that they ripped out the leap second support in order to pass the POSIX tests. Or that they didn't try to obtain full POSIX compliance, and therefore weren't tested in this particular way. Or that the POSIX tests missed this one :-). Also, a Linux system without a file recording leap seconds *will* handle time in a POSIX-compliant way, since if no leap seconds are defined, time will behave as POSIX requires. It's just that if some goes ahead and adds leap seconds to the configuration of the system, it will no longer be POSIX-complaint. Therefore, it wouldn't surprise me at all if Linux-FT passed the compliance tests simply by not configuring leap seconds, but leaving the funcionality in so that their users can configure them in (and thereby "break" POSIX compliance) if they desire.