Re: [Cbor] draft-ietf-cbor-date-tag-02 - handling of time zone offsets

Mike Jones <Michael.Jones@microsoft.com> Wed, 08 July 2020 17:26 UTC

Return-Path: <Michael.Jones@microsoft.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 954673A003E; Wed, 8 Jul 2020 10:26:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 Y8ik5jEhqFJH; Wed, 8 Jul 2020 10:26:05 -0700 (PDT)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com (mail-eopbgr640092.outbound.protection.outlook.com [40.107.64.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 98B843A003D; Wed, 8 Jul 2020 10:26:05 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dqyoSGiE1xILShNp+olKXRK1oRWMrSQ9Llx6hrVyzcVDlV/4tljoIsEvxW2d/66QnZeW+WWKT0w6bC3AezeF/va5GUH6JtF8zpIywd/OJ+Of/gQHUjOKjvfcUByZpnW08gL7AXSENAoTO8sXmRFR9iZFFMVLquH00D4Ye0jR7lRzujkx4Nkv1OUH96dOBdWX5fkbIyQuE9ncLHY/F6I33Zr7R9FPQS3E07T8Po/UXVgd60ZrLtUhBZDxcMIBOlcX1r4ZF7KKcipGu1cXV1BR3ngBl9cJzkglSCnWJrSr32sNSbL6/hxilRcmFOcbn5+7/Y6PNrhyx+8p1fqG4Qmy7A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hgb0BUaNRAmTH9DeVmUr8MgmKlz16GfIkNiIROMGLpg=; b=XN1a8ZC0STLqDDPcSfnoboDPQrnHK+ghLchc5Qp1ybS4QL097oHDBEe54YLQcdvfNvruU/TtLpkIlBVhGdNDwmVBSAw8aS+DungzeD1Ac/I9XOs69OdRKfUITJ0VC07fJvN3xIpJaAwh+hhEoBnxW/Et0mxxGSBrq3iZeiI/Q5F+eKI9s5M0iwgqOJIkI4J1CsD3HEnXETEMcKl4/vPzpGpULtp/81xaIWqOSaT94HG0CyK37GeISCdmzDpbbcGK6blLY1iqh/oIxyImP1+aUtaOZZsdxavRZtZrGrdq+jtcGdUO+VrGF541iXunpF9paLPDmRZ32pNOIipNgbcmfQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hgb0BUaNRAmTH9DeVmUr8MgmKlz16GfIkNiIROMGLpg=; b=UH0yBuZF3+7fFKBcnD4Nh9v3vjO0rSjxshPcYj7Qjlo9R+Fo2Mvqn67hbLaUwvM8ns/A8gsMfHx3ANNRMnjmgrzN7arHJG386AfiHS61XSESZB6UsHcs42p9jpF/rji/PmfWGuh3PuWz7xXGuwvHx2FlHL0N14C5PmnJdzUYFIg=
Received: from MN2PR00MB0688.namprd00.prod.outlook.com (2603:10b6:208:199::23) by BL0PR00MB0338.namprd00.prod.outlook.com (2603:10b6:207:1f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3213.0; Wed, 8 Jul 2020 17:26:03 +0000
Received: from MN2PR00MB0688.namprd00.prod.outlook.com ([fe80::2834:4ff8:111f:c308]) by MN2PR00MB0688.namprd00.prod.outlook.com ([fe80::2834:4ff8:111f:c308%9]) with mapi id 15.20.3213.000; Wed, 8 Jul 2020 17:26:03 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Carsten Bormann <cabo@tzi.org>, Jim Schaad <ietf@augustcellars.com>
CC: "draft-ietf-cbor-date-tag@ietf.org" <draft-ietf-cbor-date-tag@ietf.org>, "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: [Cbor] draft-ietf-cbor-date-tag-02 - handling of time zone offsets
Thread-Index: AdZVTNiYPeqQWbWHRAKE4VQU3qApQg==
Date: Wed, 08 Jul 2020 17:26:03 +0000
Message-ID: <MN2PR00MB06889C828D2E5900D1795D70F5670@MN2PR00MB0688.namprd00.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=d6ab2a1f-85b7-4259-941c-ca1ffb9d1ece; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-07-08T17:17:07Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
authentication-results: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=microsoft.com;
x-originating-ip: [50.47.87.252]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: c0366b12-717f-449f-8ee4-08d82363fda3
x-ms-traffictypediagnostic: BL0PR00MB0338:
x-microsoft-antispam-prvs: <BL0PR00MB033863F85B62C93102627083F5670@BL0PR00MB0338.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: HEqHUfGh9vdSh6JJ7fpR453HNA8haAFyfOIaNqs0Hhvid7wGZsIPp0vuwNCR4wLVA87LkYdF4RqfNjU8QIL/EhTHkBqQnf8zd1I9y63XEa1DQr5LbW2hClvJlzq0Z9LdBWgmpJouxjBmJ1xRSUDiRGoJ3PkeQn5PeMwDHORuXuZU5Lv2kHz/dIFTVtlAmFSibtuqftsDF2GzERt+sewyRBmv7HSTG+/70X0dD89P/MnsYGc1Cfz5ZfFlm10irTgi/kTWN03jmQuxWtTocVuGDpXSbGjvNx/FMpltR5m3byBalxmNxF29m/2dvMX0ot0L+XmaP3n+sCU5Ll3IQfO4yw07mZpAF6WHagzG7WZekzq3M6Cm/WEdsmkvoJEQa3tnTKhAF+TZUXAXnoMk8m/D4Q==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR00MB0688.namprd00.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(39860400002)(396003)(376002)(346002)(136003)(33656002)(9686003)(52536014)(8676002)(110136005)(53546011)(8990500004)(54906003)(2906002)(8936002)(6506007)(82960400001)(82950400001)(55016002)(71200400001)(966005)(26005)(66556008)(86362001)(5660300002)(478600001)(66946007)(66476007)(316002)(4326008)(7696005)(76116006)(10290500003)(66446008)(83380400001)(64756008)(186003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: 1UW4bQollE9j4TPPvTfHqZ7GeMMByNYj2YC7yCphaGdWlT2H0TXiC0BydVl1tQOF9mWNh8nSa9s7+fKX9ltYxQYQpAQMO7ozY0fdblKTBn3u0MlkoLyuE5me/T3tmmG7RqlVv3/FXyYKbeaULXPkh+sfF9aLG42MOx/upX1QZFOHp0dQx3XkFKDbwv3gNA6NAEfB3CPcLSaQiVpGwDd22G/DMijD8Y6bJFq4oxy6cDEInNkauW4CZQ14mWB/PVIrLKjq8qJ8zXUuiGwkKaRF/uVy5xk0m5cCU420RjJqkjGnQmUCE7aqO16KR1u/hMOa8UEWaOtcQRRwnjDJknc/gTuA5SfTqOFH/JCqxy2J1WahaKxfUSLBfUtrpHn9CRP2GH8JuLnxfW9z5yAK3U9C6JOTPAIp/erbHHuueEUGZHF3Ocuc3DVYIlmQn73Zwt0NPBpVggdCpaRM3+FPRGKFmHCjv4Bg4YSBdVbh3fzVmBI=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MN2PR00MB0688.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c0366b12-717f-449f-8ee4-08d82363fda3
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2020 17:26:03.5301 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: QE7NrpmpVuQvaMJCf3as7pud7nfydL4TCUrbDlUhVrEegIiRauy/FOozZ0/QJ3dS/lJ62oeIxuQwmJFeXrw25w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR00MB0338
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/RgH2j-PDXgKmi_UBt1kJ1bJtq0g>
Subject: Re: [Cbor] draft-ietf-cbor-date-tag-02 - handling of time zone offsets
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: Wed, 08 Jul 2020 17:26:08 -0000

Thanks for your review, Jim, and for your stab at addressing it, Carsten.  I'll do some of this, but I don't think we should incorporate information about details vagaries of the Gregorian calendar over the centuries.  Such statements wouldn't be authoritative or actionable.  I'd rather reference another RFC as the authority on time processing than include details here, since time processing is out of scope.  I'm thinking that we should reference RFC 3339 as the authority on time processing.

BTW, have the chairs decided who the shepherd will be?  I'm wondering whether to wait to add this new text until the shepherd review also comes in.

				-- Mike

-----Original Message-----
From: Carsten Bormann <cabo@tzi.org> 
Sent: Tuesday, July 7, 2020 10:20 PM
To: Jim Schaad <ietf@augustcellars.com>
Cc: draft-ietf-cbor-date-tag@ietf.org; cbor@ietf.org
Subject: Re: [Cbor] draft-ietf-cbor-date-tag-02 - handling of time zone offsets


> On 2020-07-08, at 06:46, Jim Schaad <ietf@augustcellars.com> wrote:
> 
> Mike,
> 
> Based on the messages that I have seen, I would suggest the following actions:
> 
> Create a new section dealing with the following: 

Let me try...

> a) a definition of what calendar day means

A calendar day is a day on a (here: the Gregorian) calendar.
The specific mapping of calendar days on civil time (here: UTC) is established by convention outside the scope of the date tags.

> b) a definition of a term other than Unix Epoch to be used as the basis.  This  is a point in time rather than a calendar day so having this as the basis point seems to be generation frisson.  It would appear that it is better to use 1970-01-01 as a POSIX calendar date epoch.

1970-01-01 was chosen as the epoch for counting calendar days for the date tags because it is convenient on systems that have Posix date/time libraries available.

> c) Guidance on how to use two points in time to compute a calendar day count.

Well, that goes deep into date/time library APIs.
But, usually, these APIs allow you to apply a timezone to a point in time and retrieve a calendar day and a time-of-day.
By zeroing out the time-of-day, time deltas can be produced that, divided by 86400 and *rounded* to the nearest integer give you a calendar day count.

Watch out when using historical dates (the Gregorian calendar has a discontinuity in 1582, which was integrated into the civil calendars either immediately or later, say, 1752, 1753, … or 1923 if you are in Greece); make sure these are actually on the (proleptic) Gregorian calendar already.  Also, historically, the calendar date changed at sunrise, noon (astronomical day/Julian day number), or sunset on some calendars, and the year number on March 25th.  Again, not a problem as long as all dates are on the proleptic Gregorian calendar and your date/time libraries aren’t broken (which many are for historical dates).

> d) Information on why it is a bad idea or how to compare a calendar date and a point in time.

A calendar date is not anchored on a timescale, only adding timezone information does that.

> e) Guidance on how to compare two calendar dates (this should be easy).

If you have the day number (tag 100), that is easy.
If you have the RFC 3339 full-date, go through a date/time library (using UTC as a time zone is the simplest approach).

Amazing.  I would not have thought that talking about calendar dates would evoke all this complexity...

Grüße, Carsten

> 
> Jim
> 
> 
> 
>> -----Original Message-----
>> From: CBOR <cbor-bounces@ietf.org> On Behalf Of Carsten Bormann
>> Sent: Friday, July 3, 2020 5:11 AM
>> To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
>> Cc: draft-ietf-cbor-date-tag@ietf.org; Michael Richardson 
>> <mcr+ietf@sandelman.ca>; cbor@ietf.org
>> Subject: Re: [Cbor] draft-ietf-cbor-date-tag-02 - handling of time 
>> zone offsets
>> 
>> On 2020-07-03, at 12:32, Juergen Schoenwaelder 
>> <j.schoenwaelder@jacobs- university.de> wrote:
>>> 
>>> PS: There are even events where there is no natural time zone that can
>>>   be associated with the event, like the first step on the moon.
>> 
>> (For those who weren’t there when it happened:)
>> 
>> Indeed, Monday, 1969-07-21T02:56:15Z.
>> 
>> Most Americans will tell you Sunday 1969-07-20 for the first steps.   The exact
>> time was actually specifically chosen to occur on prime time TV in 
>> the US (and then was slightly delayed, but managed to stay in 
>> window), which spans several time zones, which all have this on 1969-07-20.
>> 
>> Yes, I agree we should have some text on this (not the moon landing, 
>> but the issues in converting between calendar dates and times 
>> anchored on time scales).
>> 
>> Grüße, Carsten
>> 
>> _______________________________________________
>> CBOR mailing list
>> CBOR@ietf.org
>> https://www.ietf.org/mailman/listinfo/cbor
> 
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor