[time-nuts] Gnu C Time Libraries LeapSecond support

Tom Van Baak tvb at leapsecond.com
Fri Jul 22 15:19:50 EDT 2005

> p.s. On a related note, does anyone know if Microsoft Windows/Visual C++
offers any support?  And if not, how do they keep the system from breaking
down do to inconsistencies between forward and backward calculations between
tm* and time_t ?


Windows implements time_t the same way as many
platforms - time_t is simply a 32-bit integer "encoding"
for date and time. Days are t / 86400 since 1970 with
standard leap year rules and time is t % 86400 with
no leap second support. The native 100 ns granularity
kernel time functions upon which time_t is built are
no different.

Doug may have something to add here (he wrote
Windows timeserv).

I worked on the Windows NT operating system in
the 90's and on occasion did full source code
searches for leap seconds and related time topics.
As far as I recall, at the time, there was no leap
second support at all. This meant that Windows
timekeeping worked pretty much the same as any
BIOS, PDA, wristwatch, wall clock, desk clock,
car clock, thermostat, or VCR; namely, it keeps
adequate time and you re-set it when it's off by
too much. Windows does have timezone and
programmed DST support for the functions that
report local time.

I don't know about XP or Longhorn; perhaps someone
else will have more up-to-date information.


More information about the time-nuts mailing list