home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / hp / 12946 < prev    next >
Encoding:
Text File  |  1992-11-15  |  1.5 KB  |  40 lines

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