Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: karish@pangea.Stanford.EDU (Chuck Karish)
Subject: Re: gmtime(): Doesn't account for leap seconds?!
Date: 1996/04/24	[thread overview]
Message-ID: <4lm62r$edg@nntp.Stanford.EDU> (raw)
In-Reply-To: 830348597snz@genesis.demon.co.uk

In article <830348597snz@genesis.demon.co.uk>,
Lawrence Kirby  <fred@genesis.demon.co.uk> wrote:
>In article <4lid0q$itq@jik.israel.net>
>           jik@annex-1-slip-jik.cam.ov.com "Jonathan Kamens" writes:
>
>>First of all, gmtime() is governed by POSIX specs, not by ISO or ANSI specs.
>
>ANSI C "7.12.3.3 The gmtime function"
>
>POSIX defers to ANSI C for the definition of gmtime(). The tm_sec member
>of a struct tm is permitted a range of 0 to 61 under ANSI C so leap
>seconds are supported. 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. 

The C Standard doesn't consider leap seconds at all.  An implementation
can conform whether or not it handles leap seconds.

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.
--

    Chuck Karish          karish@mindcraft.com
    (415) 323-9000 x117   karish@pangea.stanford.edu



  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     ` Chuck Karish [this message]
1996-04-25  4:00       ` Mark Brader
1996-04-24  4:00     ` Jonathan Kamens
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-25  4:00   ` gmtime(): Doesn't account for leap seconds?! 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