Re: What TZ do you use to get right time w/ clockspeed?

Bennett Todd <[email protected]> Thu, 14 Nov 2002 17:00:32 -0500
Newsgroups gmane.comp.lib.libtai
Message-ID <[email protected]>
2002-11-14-16:43:30 Paul Jarc:
> Bennett Todd <[email protected]> wrote:
> > The other approach, according to Greg Black, and I just tested and
> > it also seems to work, is to leave your TZ alone, as provided by the
> > vendor, POSIXly busted, and remove leapsecs.dat, which will reset
> > clockspeed to be blind to leap seconds, which seems to leave it
> > operating consistently then with POSIX. I haven't tested this a lot,
> > but a quick try indicates that it works.
> 
> This will break libtai.

That makes sense; the "fix" in question is breaking clockspeed's
ability to hork the system clock around to TAI, thus leaving it
posix. But I wonder if that "breakage" might be right more often
than wrong?

I.e., wouldn't the other TAI timestamps you'd be inclined to feed to
libtai have been based on the same assumption that the system clock
is marching to TAI, rather than to the variable, moving-epoch
UTC-10secs or whatever it is that POSIX mandates?

I'm not disputing here that keeping the system clock on TAI is
right, and POSIX is wrong. I'm just trying to make sure I've got the
most complete understanding of the alternatives. One --- clearly
aesthetically preferable --- is to go along with djb, and fix
everything that breaks.

Another, which might be more acceptable in some contexts, would be
to leave the system clock behaving as POSIX mandates. Removing
/etc/leapsecs.dat seems to do that. If the only source of TAI stamps
that you might want to convert using libtai were other sources on
this system, perhaps having the same breakage would leave at least
mostly Ok behavior, as good as you can get with an erratically
leaping clock. In this world, your system clock is POSIX, and all
the objects you pass around that you call TAI, at least in the djb
software world (I've never seen anything else that uses TAI so far),
would actually not be TAI, they'd be TAI-wrapped POSIX time, with
inconsistent epoch and all, but at least consistently processed.

-Bennett
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE91B0AHZWg9mCTffwRAku5AKDIGDO35Sc4hKBajKXAnDodpR88OwCgpst5
yx/9QPkxcur7hmIW+ga3JJk=
=QYJZ
-----END PGP SIGNATURE-----