[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UTC, GMT, leap seconds



> POSIX mandates that system time calculations do not account for leap

Correct, POSIX basically mandates being "in denial" about leap
seconds.  The second can actually occur (tm_sec can equal 60... or 61,
but that's a typo in the spec, IERS would not do that unless they'd
already done 365 single-day leap seconds that year, and if we're
losing 6 min/year, leap seconds are *not* our biggest problem :-)

Note that debian includes a set of "right" timezone values, so you can
see how/if it matters:

% env TZ=right/US/Eastern stat /etc/motd
  File: "/etc/motd"
  Size: 403        Blocks: 2         Regular File
Access: (0644/-rw-r--r--)         Uid: (    0/    root)  Gid: (    0/    root)
Device: 302        Inode: 36908      Links: 1    
Access: Wed Jul 28 22:16:49 1999
Modify: Fri Jul 16 13:48:21 1999
Change: Sun Jul 18 22:59:38 1999

% env TZ=US/Eastern stat /etc/motd
  File: "/etc/motd"
  Size: 403        Blocks: 2         Regular File
Access: (0644/-rw-r--r--)         Uid: (    0/    root)  Gid: (    0/    root)
Device: 302        Inode: 36908      Links: 1    
Access: Wed Jul 28 22:17:11 1999  <<< \
Modify: Fri Jul 16 13:48:43 1999  <<< -* note the differences, 22 leap seconds
Change: Sun Jul 18 23:00:00 1999  <<< /

Note that the use of right/* has been known to break packages like
Kerberos in the past, due to either libc bugs or inconsistently
converting one way with libc and back with non-libc code that followed
the POSIX algorithm (I don't know if Kerberos V5 handles this
correctly yet.)
			_Mark_ <eichin@thok.org>
			The Herd of Kittens
			Debian Package Maintainer


Reply to: