Is the FreeBSD clock UTC or TAI?

Erik Trulsson ertr1013 at student.uu.se
Fri Jan 2 03:29:54 UTC 2009


On Thu, Jan 01, 2009 at 05:55:45PM -0800, Darren Pilgrim wrote:
> This came up during discussion of leap seconds and why UTC and TAI are 
> different.  My question is, does FreeBSD's internal clock use UTC or TAI 
> for timekeeping?  That is, is wallclock calculated from an exact count 
> of the number of seconds since epoch (TAI), then adjusted with a leap 
> seconds table to match UTC, or does it internally use UTC and have code 
> to deal with the ambiguous seconds that occur at each leap second?

I think the answer is no.
Instead I believe FreeBSD follows the POSIX rules which mandates using
UTC, while completely ignoring the concept of leap seconds.


There was a long thread over on freebsd-current@ in early January 2006
titled "FreeBSD handles leapsecond correctly" that discussed this at length.

(The general consensus seems to have been that leap seconds are evil and a
PITA and essentially impossible to handle 'correctly' since various
standards differ on how they should be handled.  What to do about them is
less clear however.)





-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-hackers mailing list