home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert
- From: eggert@twinsun.com (Paul Eggert)
- Subject: Re: Leap Seconds
- Message-ID: <bkheOs^U@twinsun.com>
- Sender: usenet@twinsun.com
- Nntp-Posting-Host: bi
- Organization: Twin Sun, Inc
- References: <BxKIHt.8t1@fsg.com>
- Distribution: na
- Date: Mon, 16 Nov 1992 03:15:29 GMT
- Lines: 26
-
- onward@fsg.com (Onward Lam) writes:
-
- in ctime(3C):
-
- struct tm{
- int tm_sec; /* seconds after the minute - [0,61] */
-
- The `61' is a bug in the C Standard -- it's not possible to have two
- leap seconds in the same minute. You should never see a 61 in an
- actual time. 60 occurs only when a leap second is inserted; but see below.
-
- I wrote a real dumb program, which called localtime() starting
- with the epoch to find when tm_sec would be 60/61. After a
- whole nights computing on my 720/8.05, I failed to find it.
-
- One of the Posix standards committees chickened out and let vendors
- ignore the leap second problem -- indeed, hosts are _required_ to
- ignore leap seconds in order to conform to Posix 1003.1-1990. If you
- want your clock to do the right thing instead of the Posix thing,
- you'll have to do some hacking. I recommend Arthur David Olson's time
- zone package, which you can FTP from elsie.nci.nih.gov in
- pub/tz92b.tar.Z. The package supports both ``Posix time'', which
- doesn't have leap seconds, and standard (UTC) time, which does.
-
- Perhaps if enough customers asked HP, HP would adopt the Olson code and
- support standard time as an option.
-