public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>,
	john stultz <johnstul@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	yoshfuji@linux-ipv6.org, Roman Zippel <zippel@linux-m68k.org>,
	joe-lkml@rameria.de
Subject: Re: NTP leap second question
Date: Thu, 15 Sep 2005 19:35:50 +0100	[thread overview]
Message-ID: <1126809350.3813.28.camel@localhost.localdomain> (raw)
In-Reply-To: <2088723E-06A0-40ED-A51D-19316AE57ECA@mac.com>

On Iau, 2005-09-15 at 13:21 -0400, Kyle Moffett wrote:
> only ever be a half-second off).  If you're willing to make it a bit  
> slower and a bit more code, you could even make the slewing nonlinear  
> with a continuous derivative, so it's only in place for ~20 seconds,  

It all depends what time you are using and how you are using it. There
isn't one time system and assuming there is makes all the mess.

Your kernel time ticks along at a steady rate based on a fixed period
second where that period hopefully is a passable approximation of the
rate of progression of time measured by a big pile of cæsium atomic
clocks and defined in terms of atomic radiation.

UTC (civilian time) effectively follows rotations of the earth but using
fixed interval seconds. The rotation is a bit variable so 'leap seconds'
are inserted to keep the two within 1 second of one another.  A seperate
standard (UT1) computes a 'universal' measure of earth rotation as UT0
(true earth rotation) is dependant on where you are (because the poles
wobble). And you can measure time with seconds defined as a fraction of
an earth rotation (ie variable length seconds) which is what in reality
most people use and think.

In other words, you need to decide what you are measuring before you
decide how to measure it. If you wish to record the point at which an
event occurred in civilian time then UTC is correct. If you wish to
measure the duration elapsed between two points in time then TAI (or raw
time_t) is probably more useful.

If you are recording events to some legally defined standard you have to
go read what the government has inflicted on your radio station/telco
etc and follow that.

Glibc will do the conversion work for you providing your timezone
database is kept up to date.

Alan


  reply	other threads:[~2005-09-15 18:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 17:48 [RFC][PATCH] NTP shift_right cleanup (v. A1) john stultz
2005-09-14 17:53 ` john stultz
2005-09-14 18:39   ` NTP leap second question George Anzinger
2005-09-14 18:54     ` john stultz
2005-09-15  6:49       ` Ulrich Windl
2005-09-15 17:21         ` Kyle Moffett
2005-09-15 18:35           ` Alan Cox [this message]
2005-09-14 18:13 ` [RFC][PATCH] NTP shift_right cleanup (v. A1) Roman Zippel
2005-09-14 18:25   ` john stultz
2005-09-14 19:11     ` Roman Zippel
2005-09-14 18:40 ` [RFC][PATCH] NTP shift_right cleanup (v. A2) john stultz
2005-09-20  1:28 ` [PATCH] " john stultz
2005-09-21  3:24   ` [PATCH] NTP shift_right cleanup (v. A3) john stultz
2005-09-21  5:24     ` Nick Piggin
2005-09-21  8:13       ` Ulrich Windl
2005-09-21 12:18         ` Nick Piggin
  -- strict thread matches above, loose matches on Subject: below --
2005-09-14 22:20 NTP leap second question linux
2005-09-16 21:58 ` George Anzinger
2005-09-17  1:23   ` Alan Cox
2005-09-17  1:05     ` George Anzinger
2005-09-17  1:53       ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1126809350.3813.28.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=joe-lkml@rameria.de \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --cc=ulrich.windl@rz.uni-regensburg.de \
    --cc=yoshfuji@linux-ipv6.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox