Re: Predictable Internet Time

Phillip Hallam-Baker <phill@hallambaker.com> Sun, 01 January 2017 19:24 UTC

Return-Path: <hallam@gmail.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 84DB51293F3 for <ietf@ietfa.amsl.com>; Sun, 1 Jan 2017 11:24:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AiNxp4Gx1els for <ietf@ietfa.amsl.com>; Sun, 1 Jan 2017 11:24:21 -0800 (PST)
Received: from mail-wj0-x229.google.com (mail-wj0-x229.google.com [IPv6:2a00:1450:400c:c01::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8DD3F126B6D for <ietf@ietf.org>; Sun, 1 Jan 2017 11:24:20 -0800 (PST)
Received: by mail-wj0-x229.google.com with SMTP id tq7so175654199wjb.0 for <ietf@ietf.org>; Sun, 01 Jan 2017 11:24:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+rrOrSN7nnfrw+sFnWvV8tP055+phPKJnRMXFBYsEAw=; b=IdgPochXDWNl8HenXWW8+8KmuLYh0ff8IkM6SPhYipT4mbGdXc52kqgLZ7qw30ttY6 cF1klw+qMdas2pz4J+Ads+BA5BQPPgrBkhJiGPT5puV5uCo8XVaJYWpWjdCqy/mWFZbB jNBw3Gt9vN8P8vqDjgDgxwgR42htKeVNdWOds7c7pexcsqpgLrS+0mXzZSMehEAF1HQI qusTPmYSd1qMezDTkEB0TZuaW71Wtn+t7oQiLIbOnhbBERAW6r54cGOgJERsASMODQ/O gt6+sychG03/nIhll+MM+l8HAm75MloeDbwbHXr/43sQkEsv29zJQuzGWbu1Fzx7TBnw GFTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=+rrOrSN7nnfrw+sFnWvV8tP055+phPKJnRMXFBYsEAw=; b=nJ8+fklKmpoAOqQBnpS3ABZ7sLGOVom3Ogf2vEyLrdkwORiJZEFdH1BOq/nGwAMa/x M6Sgz5uLoHLMMWqPYL7lpy4BlyWxsnJpIa9VRvQdv22Jm8lyFOp8JT7uUv1ZF5vL690Y FG8SkHpq2bgMbhtkujq4rARo0wnYFCibKvQvLHE4DrQzb5+cuzo2nefLuaaTHayYEqhR i5tljqBi+B7IAMbCy1VKX2Kj9kGl5iW/R2ntiS3kwQwZqulggdSAAJZKarV8gI37DZe0 k2bhyNiPhrU/wnB/sDEQ5VnCTuYS89qlAPrEy8hi7OIABX2BMnv0a9dpWUyCpxXfpogv 7ykg==
X-Gm-Message-State: AIkVDXIJccMqinJNurPQt8Exfv97uhGLd25Rf2hd8N1R1wvS9jvXVIhlietr5bfCyJpzv8Sji1S0elebh2Qjhg==
X-Received: by 10.194.14.196 with SMTP id r4mr57891952wjc.54.1483298658908; Sun, 01 Jan 2017 11:24:18 -0800 (PST)
MIME-Version: 1.0
Sender: hallam@gmail.com
Received: by 10.194.83.101 with HTTP; Sun, 1 Jan 2017 11:24:18 -0800 (PST)
In-Reply-To: <504e2cea0d1668c31486b05fec0a967a4446aefe@webmail.weijax.net>
References: <CAMm+LwgfQJ8aG5wB=d3fRbbeje3J9o7Z4_DCuP8DL88ouDeKzw@mail.gmail.com> <504e2cea0d1668c31486b05fec0a967a4446aefe@webmail.weijax.net>
From: Phillip Hallam-Baker <phill@hallambaker.com>
Date: Sun, 01 Jan 2017 14:24:18 -0500
X-Google-Sender-Auth: goIjFcnKYA7VCEYV-EGmm6le_lU
Message-ID: <CAMm+Lwi_jU6gjdtdM6a2n_9_89tUvWBNXxnMtSjTEA++h1D4Ew@mail.gmail.com>
Subject: Re: Predictable Internet Time
To: sandy@weijax.net
Content-Type: multipart/alternative; boundary="047d7b66fd9da9004b05450d6135"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/QsVeSqGBBIJoCqAqO_J-gY31S8E>
Cc: IETF Discussion Mailing List <ietf@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jan 2017 19:24:24 -0000

There are two separate problems

The first problem is that every machine has a common understanding of the
current instant in time. In Windows as in UNIX, this is represented as the
number of seconds that have elapsed since a particular fixed date and time.

The main issues there are precision and extent. The original UNIX and
Windows time used 32 bit integers representing seconds. These have been
replaced with 64 bit representations expressed in ticks. For example, in
Windows:

ticksType: System.Int64
<https://msdn.microsoft.com/en-us/library/system.int64(v=vs.110).aspx>

A date and time expressed in the number of 100-nanosecond intervals that
have elapsed since January 1, 0001 at 00:00:00.000 in the Gregorian
calendar.
The second problem is the representation of time. That is the conversion to
a human readable form. And this is complicated by the fact that many
systems use human readable forms for communication between machines and
many of those systems fail when presented with a leap second.

Any code path that is only exercised for less than a second per year at
most is a code path that is unlikely to be properly tested. It is thus code
that is likely to fail.

This is one of the many reasons that leap seconds are such a terrible idea.
The other is that they are unpredictable. PIT is designed to deal with the
second problem.

To have a complete solution, the way forward would be to require systems
using PIT to use the 'time smear' approach that has been pioneered by
Akamai and is now used by Amazon, Google, etc. albeit in slightly different
and non standard ways.

Using time smearing, a program will never emit the time value 12:59:60 as
demanded by the standard. Instead the leap second is added to the machine
gradually over the course of 20 or 24 hours. This avoids the need to emit a
time value that could cause a system to fail at the cost of a modest
difference between the purported and actual value.


Oh and if you think leap seconds are bad in UTC, they are even worse when
the complications of time zones are considered. London, New York and
Mountain View all add leap seconds at slightly different times.



On Sun, Jan 1, 2017 at 10:58 AM, <sandy@weijax.net> wrote:

>    The (human) universe has competing time standards.  How much of this
> problem is mitigated by time services?  I mean, if every device that cared
> about a common time was kept in synch by timeservers, and all the
> timeservers updated together, wouldn't that fix the problem?  if so, the
> problem is really that not everything has access to timeservers.  Many
> devices aren't always on the net, and when they are they have better things
> to spend bandwidth on than constant time updates.
>    How much of this problem can be solved by better time services, and how
> much of the problem cannot be?
>
> Sandy Wills
> interested lurker
>
>
> ----- Original Message -----
> From:
> "Phillip Hallam-Baker" <phill@hallambaker.com>
>
> To:
> "IETF Discussion Mailing List" <ietf@ietf.org>
> Cc:
>
> Sent:
> Sat, 31 Dec 2016 16:32:20 -0500
> Subject:
> Predictable Internet Time
>
>
>
> Well the astronomers are at it again. They are messing about with time
> which is a terrible idea. Specifically they are adding another leap second.
>
> There are many arguments against leap seconds and the arguments in favor
> really amount to the astronomers declaring that they are going to rub our
> noses in it for as long as we let them. So here is an alternative proposal.
>
> The single biggest problem with UTC is that the decisions to add seconds
> are made by a committee a few months in advance of the change. And this
> results in time becoming unpredictable because it is never possible to know
> if we are dealing with a corrected or uncorrected time. For this reason, I
> have been using TAI as the basis for time representation in my recent
> protocol proposals. This reduces but does not eliminate the confusion.
>
> Leap seconds occur at a rate of roughly ten per 25 years. So not
> correcting means a drift of 40 seconds over a century
>
>
> So to remove the confusion entirely, while preventing the need for a
> discontinuous adjustment of the drift between UTC and TAI, I propose the
> Predictable Internet Time (PIT) as follows.
>
> PIT = TAI + delta (y) where
>
> Where Delta (y) = int (37 + 0.4 * (y -2016) ) for y < 2116
> = 77 + (UTC-Delta (y-100))
>
> For values above 2116, PIT would make use of the table of UTC corrections
> with a delay of one century. This would enable manufacturers to build
> devices with built in correction tables for a design life of one century
> which should meet everyone's needs except Danny Hillis who is building a
> clock anyway.
>
>
> A conversion to PIT would be feasible for most governments as it is highly
> unlikely that the variance between UTC and PIT would ever be greater than a
> few seconds.
>
> The big problem with planning such a transition in the past is that the
> alternatives on the table have been stopping further leap seconds
> completely and continuing the UTC scheme. That would be a recipe for
> disaster unless the EU and US both adopted TAI+36 seconds or whatever. We
> could end up with a situation in which one side digs in its heels, refuses
> to change and we end up with a 'give us back our eleven days' type
> correction.
>
> Nor is changing the definition of UTC to effect simultaneous change a
> feasible solution because to do so would be to demand the astronomers
> accept a diminution in their own prestige.
>
> With a suitable definition, PIT could create a condition in which it would
> only take a decision by one major government to force a change on the
> astronomers. The commercial advantages of PIT over UTC are obvious - fewer
> things are going to break for no good reason. That is an argument that
> every politician is willing to listen to.
>
> While a variance of a second or three between New York and London might be
> inconvenient, the inconvenience is going to be a lot worse for the side not
> using PIT who have all the inconvenience of unpredictable leap seconds plus
> the inconvenience of the difference. The pressure on other governments to
> adopt PIT over is going to be significant. It is hard to see that there
> would be any real constituency for the UTC approach, the astronomers are
> much more interested in buying telescopes than time in any case.
>
>
> We could tweak the definition so that the corrections kick in sooner but
> it should be possible to build for a minimum of a fifty year service life.
>
>