Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: jik@annex-1-slip-jik.cam.ov.com (Jonathan Kamens)
Subject: Re: gmtime(): Doesn't account for leap seconds?!
Date: 1996/04/24	[thread overview]
Message-ID: <4lltpp$een@jik.israel.net> (raw)
In-Reply-To: 830348597snz@genesis.demon.co.uk

In article <830348597snz@genesis.demon.co.uk>, Lawrence Kirby <fred@genesis.demon.co.uk> 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.



  reply	other threads:[~1996-04-24  4:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-22  4:00 gmtime(): Doesn't account for leap seconds?! Edward J Sabol
1996-04-23  4:00 ` Jonathan Kamens
1996-04-24  4:00   ` Chuck Karish
1996-04-24  4:00   ` Lawrence Kirby
1996-04-24  4:00     ` Jonathan Kamens [this message]
1996-04-24  4:00       ` Chuck Karish
1996-04-25  4:00         ` Bill Marcum
1996-04-24  4:00           ` P.Bennett
1996-04-25  4:00           ` When do leap seconds occur? (was: Re: gmtime(): Doesn't account for leap seconds?!) Jonathan Kamens
1996-04-24  4:00     ` gmtime(): Doesn't account for leap seconds?! Chuck Karish
1996-04-25  4:00       ` Mark Brader
1996-04-25  4:00   ` Geoff Clare
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox