[Cbor] draft-bormann-cbor-time-tag: POSIX and UTC are not the same

Emile Cormier <emile.cormier.jr@gmail.com> Sat, 03 April 2021 02:00 UTC

Return-Path: <emile.cormier.jr@gmail.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1E64C3A14DA for <cbor@ietfa.amsl.com>; Fri, 2 Apr 2021 19:00:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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 dMxQkjLELQt3 for <cbor@ietfa.amsl.com>; Fri, 2 Apr 2021 19:00:31 -0700 (PDT)
Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (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 690633A14D4 for <cbor@ietf.org>; Fri, 2 Apr 2021 19:00:31 -0700 (PDT)
Received: by mail-pj1-x1034.google.com with SMTP id a22-20020a17090aa516b02900c1215e9b33so5296043pjq.5 for <cbor@ietf.org>; Fri, 02 Apr 2021 19:00:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=hAIhaN3wF9HBkMw96KNISbhRnfGpZqksWMxXTnUhjSw=; b=d6keGUNynwa3A4Hh4A6uQno3EAYydqkHE9Ih28RZEYOFtjQ5RXOEdpBicPiH5rT4F+ lKJ4OamcPNMqBQFTHiEFT8WYzAE+3bRt3C3wPYlKfxKZdap0XMYvI/Fn+urzkuYEWnND gq3y/kQ+wwKdMHwTIW4DTCE847tPNlWQ+IofY/U8CpAGXP1ZU5L1gVxr6b/UVVhFG3A7 LzN+8UENJFsFhkQEXvmIUpUy5xrk9mbOivyueEnUBx1MNV9zSJCiAL8cxEwLMYMrqFhx uQwE9c1HjaRcpFM5VJuUF0cb3/wCFI+5lljb3W9+l9eEf1seTazQq4PY51hnjaJY7Nu3 O7Aw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hAIhaN3wF9HBkMw96KNISbhRnfGpZqksWMxXTnUhjSw=; b=rHooCK7jjuWke0lHXWnp9A51zaq4NUh+shm0ff4Y813d7JSVhoX7ogRQyTMmxEzArX E250YnSv9V/NBf6OP2Nhk+AqtnQKdHToER5jPj30xk6+aF9zNUVbWcHvsrC5m3L6IJCt K6cOXzvLkjZsK/BxNJjDp5cUucK23dE3CQ8xyg2mTgQPxLIUG58U9/dNogapuvvwSKIw eNyHOdKnXUEmJBcD3EkS387e1KJKmG7XUoH9CUMAl/a4F3wHE9igsyu4Rrxs/K+8LIjz Jxd42Xk3ghoWYvnqdXhbppZAUby+al4+KbADlxgB19dkTJHSXQPNhFOzzr4OSVcQ29G/ R81Q==
X-Gm-Message-State: AOAM530+SB198OjFAFB+b5pTgr8NC8aCjapRRCn/4tQXNLht6gVCkFzZ zt40SdYXJhbZ5A9+g1L6z8VPuh9InrI/SXYP7n2sdxG42EK4jA==
X-Google-Smtp-Source: ABdhPJwY2kOPmlD6LIsulnVniii6ktlRMhqxnSW4JfMCaVH9j6S8WxWUKRv9GXps0568YTyg+Y/4Cq7PuXyO6cJ3ksU=
X-Received: by 2002:a17:90b:16cd:: with SMTP id iy13mr16708428pjb.46.1617415229756; Fri, 02 Apr 2021 19:00:29 -0700 (PDT)
MIME-Version: 1.0
From: Emile Cormier <emile.cormier.jr@gmail.com>
Date: Fri, 02 Apr 2021 23:00:19 -0300
Message-ID: <CAM70yxBO8Rr4Fd2GBD4-K=8DY7oCefYLL=61_piLwJ8Wj=Dxww@mail.gmail.com>
To: cbor@ietf.org
Content-Type: multipart/alternative; boundary="0000000000003957d405bf07d47a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/1dHOOsJgv_7lDyU8hOBEtsUMjTQ>
Subject: [Cbor] draft-bormann-cbor-time-tag: POSIX and UTC are not the same
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 03 Apr 2021 02:00:36 -0000

In draft-bormann-cbor-time-tag (tags 1001-1003), UTC and POSIX are
confounded together under the same value of 0, under section 3.4. Key -1:
Time Scale.

UTC and POSIX are not the same! Per https://en.wikipedia.org/wiki/Unix_time:

... leap seconds are ignored, with a leap second having the same Unix time
> as the second before it, and every day is treated as if it contains exactly
> 86400 seconds. Due to this treatment Unix time is not a true representation
> of UTC.
>

This is reinforced by the fact that C++ has distinct clocks for system time
and UTC:

https://en.cppreference.com/w/cpp/chrono/system_clock
https://en.cppreference.com/w/cpp/chrono/utc_clock

There should therefore be distinct values for POSIX and UTC.

Cheers,
Emile Cormier