[LEAPSECS] leap seconds in POSIX

Steve Summit scs+ls at eskimo.com
Sat Feb 1 11:33:14 EST 2020


Warner Losh wrote:
> But the problem with time_t are legend. I should do a talk that
> lists them all.

Here is, I think, the fundamental one, as I like to describe it.

As Clive Feather observed years ago,

	There are three desirable properties for time:
	(1) A day is always 86400 seconds long.
	(2) A second is a constant length.
	(3) 00:00:00 is, on average, astronomical midnight.

	It turns out you can have any two simultaneously, but not
	all three.  So there are three official time scales:

	TAI     (1) and (2) are true
	UT1     (1) and (3) are true
	UTC     (2) and (3) are true

But if you think about it, for time_t as defined by Posix, we're
trying to have (1), (2), and (3) all true.  And that just won't
ever work.

You can "solve" the computer leapsecond problem.  But you can't
solve it and keep time_t.  Also you can't get rid of time_t,
because it's far too widespread; *everyone* uses it.  So the only
possible solutions involve awkward compromises involving two,
separate-and-unequal ways of representing time.  And no one wants
that.  (We've got way too many ways of representing time already...)


More information about the LEAPSECS mailing list