Re: [Ntp] Leap second draft

Watson Ladd <watsonbladd@gmail.com> Mon, 27 January 2020 15:57 UTC

Return-Path: <watsonbladd@gmail.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 239C112086D for <ntp@ietfa.amsl.com>; Mon, 27 Jan 2020 07:57:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 M4H3VDkYPI88 for <ntp@ietfa.amsl.com>; Mon, 27 Jan 2020 07:57:01 -0800 (PST)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 76126120865 for <ntp@ietf.org>; Mon, 27 Jan 2020 07:57:01 -0800 (PST)
Received: by mail-lj1-x234.google.com with SMTP id h23so11246684ljc.8 for <ntp@ietf.org>; Mon, 27 Jan 2020 07:57:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Zz47yfLy/ulMb5qa2a04A7ZWOUdFOr060Wvsu7frOik=; b=Emq7qxg9/sEK367Qc7+mjyp0a0tK7gveMemmPtwAj/2GwZ2a8uWC0T7s7M+mFBlsvR HqSg8dE2ZcC84Svg4LbYJZRVmAoEInS4L0vaXEGqDsTpF/iN+tM1il0yDI4T214xL1se Q8R688NsVyMSx3xMeKJe7IT0BM/0Ebgt49Ml5MBT7a0Grfv6zZhZVMAJSFVnx3zh3wcY Z9rth69wa7xZRyWzGpjKEQVt6MlOYRI5kI/F2/Y3u2nlu9QImRKmaXbecucxEDLpzvCD rER6x2q4Vstr4wKp7pWmoCFGja2CWAl4SRFET1pNTg3DV/5DkddHq9HmEYY5OlawuEVA BJRw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Zz47yfLy/ulMb5qa2a04A7ZWOUdFOr060Wvsu7frOik=; b=COc+3mLvZkbPKH4wnrtmabWUfQmkv/NAPZ9d7hVFi/eJOG6/Mamr5aavZVo7BYcDIr BaFGRf5qBtE0jtMhjLWhMR365A67b0P0R7VBbJaEeRO5xrzATqsYglWY+4miC+Szenx+ Z5r5tAlLzKEzACaPAKdz+sgdpFGSDXX22ND0unLKdhyyqgdNxBb1wmKM+OS4ZNIl4Ym5 IkoET1FOZxFlvEp0kceoYWkD4JmerFwBfGMivSuIrtH9Ec+Ru2mGMKE5bqsXcdSWjMw/ qAd/h/vH18s90icDNnFmYjCAkcgRiPr9XAtJZDsQAh0ypeqihUtbsDHs8rEb3tlHdYWs t7jw==
X-Gm-Message-State: APjAAAVPwgNsMDGILv8PcBdVIJ6EmJmQy7m+k7uKIdDscKlkfstt4oXY /pdF1bZxq0rGthUEbFoBNLByMvA5TkUm1y9K+SM=
X-Google-Smtp-Source: APXvYqw39agS7OOzE/V3hGEI/oXqRsmwruHitQdsJAk8yhU0B+8HbwjZCfUC8KWM/zBM2YPp7TxtFWMIAKnUmRUzO3c=
X-Received: by 2002:a2e:98ca:: with SMTP id s10mr10742080ljj.160.1580140619502; Mon, 27 Jan 2020 07:56:59 -0800 (PST)
MIME-Version: 1.0
References: <CAJm83bD5Ozkpg5TpkogOW6xeeNQL3ZziLO9URM7haqN8Wrp=Wg@mail.gmail.com> <CACsn0cmZkRifrnbVbPw2=9ww+ttmbAGCW39LhT+jhDLLyU8e+A@mail.gmail.com> <CANCZdfo_cbo3UngOWEc4mM4_nLK=J81zSiF0shvsu5mENUGPMw@mail.gmail.com> <CANCZdfo-OW7d454Qqo9eqfOpw367A4gg4-2UJ5XdC=n0u_t+BQ@mail.gmail.com> <F7D6BF99-260C-467B-9AF7-94F1F5E2721B@frobbit.se> <CANCZdfoh0dTDLeJtJHaVtdSnpTc-jzc+nSUk2qDzrFcGr7=zfg@mail.gmail.com> <01C94076-A916-42F8-8BA7-8AE8C4AB71D2@frobbit.se> <9b5a6a5e-7727-8b5c-0e70-959e03a91561@meinberg.de>
In-Reply-To: <9b5a6a5e-7727-8b5c-0e70-959e03a91561@meinberg.de>
From: Watson Ladd <watsonbladd@gmail.com>
Date: Mon, 27 Jan 2020 07:56:45 -0800
Message-ID: <CACsn0cmKV+y3nof7LUDZGvDKPPK6Q2sNZ1DB+a6DfPgg+XBuqw@mail.gmail.com>
To: Martin Burnicki <martin.burnicki@meinberg.de>
Cc: Patrik Fältström <paf=40frobbit.se@dmarc.ietf.org>, Warner Losh <imp@bsdimp.com>, NTP WG <ntp@ietf.org>, Daniel Franke <dfoxfranke@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000521c59059d2128b4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/LTO0vdnNrr_Z0xho8uvOZfrlKYY>
Subject: Re: [Ntp] Leap second draft
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Jan 2020 15:57:04 -0000

On Mon, Jan 27, 2020, 12:38 AM Martin Burnicki <martin.burnicki@meinberg.de>
wrote:

> Patrik Fältström wrote:
> > On 24 Jan 2020, at 15:12, Warner Losh wrote:
> >
> >> No. That is wrong. The numbering of the leap second is undefined. This
> is one way to resolve the issue, but it is not the only way. You will not
> find this specified, except indirectly via math on the struct tm, which
> isn't definitive about what to do during the leap.
> >
> > What I see are two things. First the math:
> >
> >> If the year is <1970 or the value is negative, the relationship is
> undefined. If the year is >=1970 and the value is non-negative, the value
> is related to a Coordinated Universal Time name according to the C-language
> expression, where tm_sec, tm_min, tm_hour, tm_yday, and tm_year are all
> integer types:
> >>
> >> tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
> >>     (tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -
> >>     ((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400
> >
> > Then the definition of tm_sec which can have values [0,61].
>
> Yes, you can set tm_sec to 61, but how should the conversion function of
> the runtime library know that it shoudld return second 61 of the current
> day instead of second 0 of the next day? In POSIX there is no way I'm
> aware of that can be used to tell the conversion function that a
> specific second is an inserted leap second.
>

Operating systems with the ntp_adjtimex system call do return leapsecond
info. This includes linux and the *BSDs.

System call interfaces can be extended if we have needs here.


>
> Martin
> --
> Martin Burnicki
>
> Senior Software Engineer
>
> MEINBERG Funkuhren GmbH & Co. KG
> Email: martin.burnicki@meinberg.de
> Phone: +49 5281 9309-414
> Linkedin: https://www.linkedin.com/in/martinburnicki/
>
> Lange Wand 9, 31812 Bad Pyrmont, Germany
> Amtsgericht Hannover 17HRA 100322
> Geschäftsführer/Managing Directors: Günter Meinberg, Werner Meinberg,
> Andre Hartmann, Heiko Gerstung
> Websites: https://www.meinberg.de  https://www.meinbergglobal.com
> Training: https://www.meinberg.academy
>
>