tobold.org

correct • elegant • free

△ comp.protocols.time.ntp △

◅ C9X FCD - 7.23.2.6 Normalization of broken-down times

Writing and reading time_t values ▻

C9X FCD - 7.23.2.6 Normalization of broken-down times

In article <35F698AB.33B3293B@cl.cam.ac.uk>,
Markus Kuhn  <Markus.Kuhn@cl.cam.ac.uk> wrote:
>> But if you want to tick UTC, you need comparable infrastructure to tell
>> you when to step the clock backwards.
>
>Yes, and it has already been in use for years! Sources of UTC time
>signals usually contain leap second announcements.

Right.  So your claim is not that there's anything intrinsically hard
about doing the "right" (in the words of tzcode) thing, just that it
hasn't been deployed yet.

>Think of the following two cases:

Here's another case.

I have a computer which occasionally connects to the net; when it does
so, it chimes with a reliable clock.  It uses this information to trim
its own clock.  On very average hardware, I can easily achieve a drift
of less than 0.1s with a weekly synchronization.

Now, if my computer ticks UTC, I have a serious problem whenever a leap
second occurs.  If I don't have a way to tell the clock daemon about the
leap second, it will seriously misjudge the clock drift, and will take a
long time to settle down again.  If I do have a reliable way to find out
about leap seconds, then I merely have to put up with the clock going
backwards.

On the other hand, if I tick TAI, leap seconds are not a problem.  (Of
course, because they don't exist in TAI.)  My clock keeps ticking
monotonically forward; there is no danger of drift calculations going
awry.  Assuming that I care that `date' always reports the correct
civil time, I need to update my leap second table any time between the
announcement and the occurrence of the leap second.

Tim.
--
Tim Goodwin | "The long and short of it is that its all
Cygnus UK   | pretty messy, and it will probably get a whole
Cambridge   | lot messier in the future." -- Ned Freed

Original headers:

From: tgoodwin@nan.cygnus.co.uk (Tim Goodwin)
Newsgroups: comp.std.c
Subject: Re: C9X FCD - 7.23.2.6 Normalization of broken-down times
Date: 9 Sep 1998 16:56:19 GMT
Organization: Cygnus Solutions Ltd, UK
Message-ID: <6t6bvj$8oc$1@korai.cygnus.co.uk>
References: <35E35711.7CE2B06D@microhouse.co.jp>
  <35F531CD.1AE90180@cl.cam.ac.uk> <6t5rus$jqf$1@korai.cygnus.co.uk>
  <35F698AB.33B3293B@cl.cam.ac.uk>

△ comp.protocols.time.ntp △

◅ C9X FCD - 7.23.2.6 Normalization of broken-down times

Writing and reading time_t values ▻