Re: Predictable Internet Time

"Patrik Fältström " <paf@frobbit.se> Wed, 29 March 2017 05:52 UTC

Return-Path: <paf@frobbit.se>
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 E2F80127241 for <ietf@ietfa.amsl.com>; Tue, 28 Mar 2017 22:52:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 UKYNP0LXSZ-e for <ietf@ietfa.amsl.com>; Tue, 28 Mar 2017 22:52:19 -0700 (PDT)
Received: from mail.frobbit.se (mail.frobbit.se [IPv6:2a02:80:3ffe::176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8F172129666 for <ietf@ietf.org>; Tue, 28 Mar 2017 22:52:19 -0700 (PDT)
Received: from [77.72.226.187] (unknown [IPv6:2a01:3f0:1:0:40c0:f25d:2a01:265]) by mail.frobbit.se (Postfix) with ESMTPSA id 106A821903; Wed, 29 Mar 2017 07:52:16 +0200 (CEST)
From: "Patrik =?utf-8?b?RsOkbHRzdHLDtm0=?=" <paf@frobbit.se>
To: "Joe Touch" <touch@isi.edu>
Cc: "Phillip Hallam-Baker" <phill@hallambaker.com>, "Tony Finch" <dot@dotat.at>, "IETF Discussion Mailing List" <ietf@ietf.org>, "Jared Mauch" <jared@puck.nether.net>
Subject: Re: Predictable Internet Time
Date: Wed, 29 Mar 2017 07:52:15 +0200
Message-ID: <A4FF8930-F644-496A-8AEE-F3A8504039E8@frobbit.se>
In-Reply-To: <240f1201-937b-24d1-d066-4f35a6788cb8@isi.edu>
References: <CAMm+LwgfQJ8aG5wB=d3fRbbeje3J9o7Z4_DCuP8DL88ouDeKzw@mail.gmail.com> <9F0F8841-BC1D-4C27-83EF-8F93F33FB021@puck.nether.net> <CAMm+Lwh5JMn+JxPB3Q3RKpeibckVSB2Fqm_RajcnU28OAx=jOw@mail.gmail.com> <1483474918.1346083.836313393.2699EBD5@webmail.messagingengine.com> <CAMm+LwjJDyCv2mBG8ob-njDj-4m5tr7jP6XAiEn1ME5NCYcpiQ@mail.gmail.com> <263de3ca-e2a2-c99f-1a9d-18e352c900ce@isi.edu> <869e1c74-2e6e-f4cd-4830-50985bab6be8@isi.edu> <4079C051-C0C1-4220-8F0A-39F1FF0EDEF3@frobbit.se> <240f1201-937b-24d1-d066-4f35a6788cb8@isi.edu>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=_MailMate_06216BC6-9D1F-4127-BB5B-A375C618C7E9_="; micalg=pgp-sha1; protocol="application/pgp-signature"
X-Mailer: MailMate (2.0BETAr6080)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/nNTuiD1di9rjlH_tejcpdcsvxK4>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 29 Mar 2017 05:52:22 -0000

On 28 Mar 2017, at 19:47, Joe Touch wrote:

> On 3/27/2017 11:37 PM, Patrik Fältström wrote:
>> Joe,
>>
>> I have read your I-D and like it! Let me start there :-)
>>
>> What I think is not clear enough is the problem with POSIX, and it should be more clear in some place, maybe section 6.1, that POSIX definition which is in use in quite a number of systems do not handle leap second very well. Too many do believe the time_t definitions include the number of seconds since epoch when in reality it does not (as you note in the definitions).
>
> I can make that more clear, but AFAICT POSIX time is *defined* as seconds since the Unix epoch *not counting* leap seconds at all.

Well, one of the problems is that the specification of POSIX time is a bit unclear.

>> One could even question whether it is Continuous as two seconds will have the same number since epoch around the addition of a leap second
>
> > It is Continuous by definition.
>
> When UTC adds a leap second, nothing different happens to POSIX time.

No, that is not correct if you look at the day when the leap second is added.

POSIX is number of (days * 86400) plus seconds inside the current day. This implies if there is a day with a leap second there will be 86401 seconds which also will be the first second the following day.

>> There are some people that have suggested a change, for example <http://www.cl.cam.ac.uk/~mgk25/time/c/> but I have not seen any movement. Maybe you know more than me on this?
>
> AFAICT, that's just attempting to redefine the <time.c> interface as returning UTC rather than POSIX time.

The UNIX time_t struct do deliver UTC, including leap seconds, but the number of seconds from epoch is wrong regarding leap seconds. Includes one leap second within the day of the leap second being added and without leap seconds otherwise.

> Which works *IF* your machine has access to updated leap-second information, e.g., via NTP.

Correct, if one have access to leap seconds, one could adjust the number of seconds and that could happen already today as POSIX definition is a bit unclear on this. But people have not implemented it. So instead for example Google smear the leap second over the day so that there is not bump in the road, and they run NTP servers that do give back this smeared time that differs from UTC.

All just because a. unclear information from POSIX and b. bad implementations in *ux.

   paf