Re: [Cbor] CBOR tag for RFC 3339 full-date values

Mike Jones <Michael.Jones@microsoft.com> Wed, 03 June 2020 15:03 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 E92033A0918 for <cbor@ietfa.amsl.com>; Wed, 3 Jun 2020 08:03:06 -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 R8y8Yax-8rfO for <cbor@ietfa.amsl.com>; Wed, 3 Jun 2020 08:03:04 -0700 (PDT)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com (mail-eopbgr640129.outbound.protection.outlook.com [40.107.64.129]) (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 9A1CE3A08FD for <cbor@ietf.org>; Wed, 3 Jun 2020 08:03:04 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RcT5VnL+tgrE44F03JXe1JfNV0KflB8zpA8MhYZqzc3FYJVV4fvU7dRFojo26yFKZxzEkEtz4Fg181Y7vwyyOteL6Hfsd0ndGuJFdi2xZzk4LyB4nCVxI62uu5Z1/SFhmMIxyluSi2HmTH0vnL3oMyh2Mwi9Q1ubhHkzXF8G5xuVwmCjzCat21CRsvXmw9XnXCMfugs5+JO2YLK5yK3FzPY+bn339ozcMKXouO8vqMbWtHUCbE0Hlj3gUjq+i8gw1kcvpxvOqBzDl4kf4RiGC1/UXwuNbbgmZ+1qMMJ7fIvOaDSXN4gMSoTtTibiGn6tPODJEeo/XRCZEViZTfxvnw==
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=YiRxF2sGcvlVJNw3i7EvRvqx65fGn3/FucpVkL8LTNc=; b=d6q5dqL7WMX1xAFVcmXqszqKJpHh8HLgJFMmY8qBQRCH3H6NTiMLemfy7XI1RXWw4pGIZjktwOPjHLQrXOjAnniD3v2O5Z4u6iu6jH6UbEEJGBDTlj36B45mMtxrmgLfeS6+TTue2y0YWKZ3Soptxp5Gz3iv0d14GQutnMhoeljAiNU4ANWYeN/A24Gb83A5LGsKxRwHk2bjfZ8dnRaoZ48iTNQs4zGdBbJu1rHxiCxnUDrhMUbUrx9zMf3J5h+NTWLCdXkOeFp3dru/4QyVroX3NhCeoAwId8Lb++UQMcSUyVySDD6M28cG9eVaujnH2Jly22D2sfN1Mz19ztnwOQ==
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=YiRxF2sGcvlVJNw3i7EvRvqx65fGn3/FucpVkL8LTNc=; b=bwkpBTJ5SsmOxFn1DLYkCw44LWStwjDUOeVMyfVir54eqKIogu2e4hR1zExeok1hBa8olc6TI87pOxRRTrJlMyIovOZqBbqFBR86RVov/8ESO3dceNynblNq4PEAYqqRN4QiFa1krJo7Do8RAil3a3nA4F7wvhi1KcXVXS0WqaQ=
Received: from MN2PR00MB0688.namprd00.prod.outlook.com (2603:10b6:208:199::23) by BL0PR00MB0323.namprd00.prod.outlook.com (2603:10b6:207:1f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3104.0; Wed, 3 Jun 2020 15:02:55 +0000
Received: from MN2PR00MB0688.namprd00.prod.outlook.com ([fe80::c1e4:c91b:f4de:f548]) by MN2PR00MB0688.namprd00.prod.outlook.com ([fe80::c1e4:c91b:f4de:f548%5]) with mapi id 15.20.3106.000; Wed, 3 Jun 2020 15:02:55 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Carsten Bormann <cabo@tzi.org>
CC: "\"Richter, Jörg\"" <Joerg.Richter@pdv-FS.de>, "cbor@ietf.org" <cbor@ietf.org>, Anthony Nadalin <tonynad@microsoft.com>
Thread-Topic: [Cbor] CBOR tag for RFC 3339 full-date values
Thread-Index: AdY5uA3w3er6eARrTNKEyZ0rNe5zlw==
Date: Wed, 03 Jun 2020 15:02:55 +0000
Message-ID: <MN2PR00MB06887031F62267E6FE7E1CFFF5880@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=34bcdc4a-2e96-4be3-abd4-00002a825baf; 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-06-03T15:00:42Z; 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: c12d539f-ca23-489a-d8ba-08d807cf3230
x-ms-traffictypediagnostic: BL0PR00MB0323:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <BL0PR00MB0323C5A49AF99CE34940C203F5880@BL0PR00MB0323.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:6790;
x-forefront-prvs: 04238CD941
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: qaRImEPEJK+MoiZrh2Kvlq55xyrGegbXs3Rqt5YMCzW3/PWxTZURpoyTJYr4YsCorlOOPXoGQJK2tmCcCW+FmIgNlaHMJ5L25/ntLIZgvOKYmpF0HuU65F6pBtEd9RSheKZluepMkO00MWWdyv3zF+/gIOfFx0+c+eFSO6l+s2evJFgWZP+2WZbfhlZP/iT8mpdtZ3ou3nWN4HdjGcbOaB8CZn4IgTtPG/XG3zzuSOZG0oyME6WRsuPbgDjRJFb76oguAP3Fx7HVSp1rlO+evSfgrffNYt5+pRfOwr8braSC977h4XtF2fpYTfByCGwLfexOzwZu/fp9nKcS1iRkxCnvrSmTNPBr5eyfSC8zTOeHTgihXu3+sVkcPWosveomWkchvTp2uOC0zuJvG1sWGw==
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)(376002)(396003)(136003)(39860400002)(366004)(346002)(54906003)(8676002)(66476007)(2906002)(4326008)(71200400001)(107886003)(76116006)(64756008)(66446008)(66556008)(8936002)(83380400001)(66946007)(478600001)(966005)(6916009)(33656002)(53546011)(26005)(186003)(52536014)(82960400001)(66574014)(316002)(6506007)(9686003)(5660300002)(10290500003)(8990500004)(55016002)(7696005)(82950400001)(86362001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: +/XQw+xztQvH5YisQ1sMEEJ59hdpTBqJyghAtJ6Ezf6rBy88CvFypfy5zAiGH5rReZmWhrQTAywxy8bd3K0GcW/ZZMfEpliLLO/fh8RDO1Qpwra+NSqdanxiEk5Be4GbivJabxPqAerDPVHtEW5/fb2qWIDw++0PUg+f3v3SVqiaIT+YxGygRzTzfnAuG7iRF6NM/HfZeF/RZN7FgbcdfP63LswDyaPqPW/Y+TuwpMlxGy7eKaMJ8mhzqyhHDZ0DlBDA980iuzyhAN9B8qMi5NpXZ+7r0I4CbbUDYx/PbE8IPBctTDQOa/lrgpBIE7sgfDOb9jo615EvMufOGjwAxUHph2lVApsVwbRSXod9F1Ptj12uP4sTSjCsvoe2seml0H/4D9NMVCvp9pUcAX6nBLQJLMIRJFPJFQrAkovbebkd346plkF7UGpAy37+coP33ZHuTLIaWgxg22J04gId4Q/we618L7PNZt/BXtQb1oY=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c12d539f-ca23-489a-d8ba-08d807cf3230
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2020 15:02:55.3486 (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: 28bm1eFf2jtwtoxnJwgj6el9gDKu33ZgUR9X6H+tdlVNVVutrm1CS1OxAa9izD4CT3WbB9PpEhjvXos8QCUiKQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR00MB0323
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/KnG3XZPG3NZ-1eu7WK2Ow8LBoQo>
Subject: Re: [Cbor] CBOR tag for RFC 3339 full-date values
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, 03 Jun 2020 15:03:07 -0000

Let's discuss whether to add a non-normative reference to the Modified Julian Date to the draft or not.

				-- Mike

-----Original Message-----
From: Carsten Bormann <cabo@tzi.org> 
Sent: Wednesday, April 22, 2020 7:22 AM
To: Mike Jones <Michael.Jones@microsoft.com>
Cc: "Richter, Jörg" <Joerg.Richter@pdv-FS.de>; cbor@ietf.org; Anthony Nadalin <tonynad@microsoft.com>
Subject: Re: [Cbor] CBOR tag for RFC 3339 full-date values

One other nugget of information that might be useful to minimize confusion is that the tag-100 date number for a date referenced to UTC, TAI, TT or similar, is the MJD (Modified Julian Date) number of the day to the same reference minus 40587.

Grüße, Carsten


> On 2020-04-22, at 06:15, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Hi Mike,
> 
> thanks for submitting the draft!
> I’d include the value zero (i.e., 1970-01-01 itself), not just positive or negative values.
> (Throughout the CBOR related work, we have avoided “positive” and 
> usually said “unsigned”, which includes zero.)
> 
> s/applicaitons/applications/
> 
> Grüße, Carsten
> 
> 
>> On 2020-04-22, at 03:27, Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org> wrote:
>> 
>> I've posted https://tools.ietf.org/html/draft-jones-cbor-date-tag-01, which includes the numeric date tag proposed by Jörg.  I'll plan to join the CBOR call tomorrow and would be glad to talk about this draft for a few minutes, if there's room to do so in the agenda.
>> 
>> 				Best wishes,
>> 				-- Mike
>> 
>> -----Original Message-----
>> From: CBOR <cbor-bounces@ietf.org> On Behalf Of Richter, Jörg
>> Sent: Monday, March 16, 2020 12:33 PM
>> To: Mike Jones <Michael.Jones@microsoft.com>
>> Cc: cbor@ietf.org; Carsten Bormann <cabo@tzi.org>; Anthony Nadalin 
>> <tonynad@microsoft.com>
>> Subject: [EXTERNAL] Re: [Cbor] CBOR tag for RFC 3339 full-date values
>> 
>>> Jörg - I'll also add you as a co-author.  What affiliation and e-mail address for you should I use?  And is there a URL for a blog or Webpage you'd also like me to include for you?
>> 
>> Sorry, I missed this one.
>> 
>> You can use joerg.richter@pdv-fs.de (pdv Financial Software GmbH). I got no blog or webpage.
>> 
>> Thanks,
>> 
>> - Jörg
>> 
>> ________________________________________
>> Von: Mike Jones <Michael.Jones@microsoft.com>
>> Gesendet: Montag, 16. März 2020 19:52:38
>> An: Richter, Jörg
>> Cc: cbor@ietf.org; Carsten Bormann; Anthony Nadalin
>> Betreff: Re: [Cbor] CBOR tag for RFC 3339 full-date values
>> 
>> Jörg - please respond to my request below for co-author information.
>> 
>>                               Thanks,
>>                               -- Mike
>> 
>> -----Original Message-----
>> From: Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org>
>> Sent: Wednesday, March 11, 2020 3:11 PM
>> To: Carsten Bormann <cabo@tzi.org>; "Richter, Jörg" 
>> <Joerg.Richter@pdv-FS...de>
>> Cc: cbor@ietf.org; Mike Jones <Michael.Jones@microsoft.com>; Anthony 
>> Nadalin <tonynad@microsoft.com>
>> Subject: Re: [Cbor] CBOR tag for RFC 3339 full-date values
>> 
>> The point of having the tag is that the code knows what follows.  If 
>> a polymorphic tag were used, in which two unrelated representations 
>> of dates are legal, then the code doesn't know what follows.  And it 
>> also opens up questions that it would be cleaner to never have to 
>> consider - questions such as "If the polymorphic tag is adopted, must 
>> Mobile Driver's Licenses accept both representations?"  And "Will 
>> interoperability be harmed if some Mobile Driver's Licenses use one 
>> representation and some use the other?"  (The answer to that one is 
>> probably "Yes, interoperability will be harmed".)
>> 
>> Carsten, I take your point about both integers and floats being acceptable for tag 1.  But those are closely related (numeric) representations of the same thing.  Whereas a date string versus number of days relative to the Epoch are nearly unrelated representations, with fairly complicated conversion rules between them (involving leap years, leap centuries, leap 400th years, etc.).
>> 
>> Given that Jörg stated below that he's OK with using different tags, I propose that we move forward with using tag 1004 (requested) for RFC 3339 full-date values and tag char('d') (requested) for integer number of days relative to the Epoch.  If I don't hear objections soon, I'll publish that draft.
>> 
>> Jörg - I'll also add you as a co-author.  What affiliation and e-mail address for you should I use?  And is there a URL for a blog or Webpage you'd also like me to include for you?
>> 
>>                               Cheers,
>>                               -- Mike
>> 
>> -----Original Message-----
>> From: CBOR <cbor-bounces@ietf.org> On Behalf Of Carsten Bormann
>> Sent: Wednesday, March 11, 2020 2:09 PM
>> To: "Richter, Jörg" <Joerg.Richter@pdv-FS.de>
>> Cc: cbor@ietf.org; Mike Jones 
>> <Michael.Jones=40microsoft.com@dmarc.ietf.org>; Anthony Nadalin 
>> <tonynad@microsoft.com>
>> Subject: [EXTERNAL] Re: [Cbor] CBOR tag for RFC 3339 full-date values
>> 
>> On 2020-03-11, at 21:31, Richter, Jörg <Joerg.Richter@pdv-FS.de> wrote:
>>> 
>>> (Replying to more than one message here)
>>> 
>>> Carsten Bormann:
>>>> Is that a good way forward?
>>> 
>>> I am fine with the suggested procedure.
>> 
>> Great!
>> 
>>> 
>>>> What I like about Mike's draft is that he references RFC 3339, 
>>>> which already is an established specification for how to write 
>>>> dates textually
>>> 
>>> ISO 8601 also defines this format for dates. It is mentioned in the "Detailed Semantics"
>>> section of my proposal.
>> 
>> ISO 8601 is very "flexible".  RFC 3339 uses ISO 8601, but helps by restricting this to commonly used cases.
>> So I think referencing RFC 3339 is strictly better than just naked ISO 8601.
>> 
>>> Mike Jones:
>>>> I'm fine merging Jörg's numeric date tag into my draft, provided 
>>>> that the result is not a polymorphic tag, in which the value could be either a number or a string.
>>>> We should allocate separate tags for string date and numeric date, 
>>>> just as tags
>>>> 0 and 1 are different, and not polymorphic.
>>> 
>>> I've got the impression that using a polymorphic tag would be no major problem.
>>> We can even specify that decoders might only support one representation of the tag.
>>> I think it would have the same effect if a decoder supports only one of the two tags.
>>> But either way I would have no objections to using two tags.
>> 
>> I'm not sure I like the term "polymorphic" here too much - in any case, the "value" would be a date.  The content could be both text and number.  Tag 1 already does this (integer vs. floating-point), so we already have to deal with these (i.e., allow applications to not just say "Tag 1", but "Tag 1 with integer content").  But we did separate Tag 0 and Tag 1, mostly because the semantics of the value are subtly different.  Are they here?
>> 
>>> Laurence Lundblade:
>>>> I'd suggest the numeric date be restricted to integers. No floats, 
>>>> bignums, decimal fractions.
>>> 
>>> Yes, that was the plan. Only major types 0 and 1.
>> 
>> Finer granularity between dates would be times, which we already have, so this naturally should be integers.
>> 
>>>> Fractions of days can be represented by tag 0 or tag 1 using hours, 
>>>> minutes, seconds. 64-bit integer counts of days are large enough.
>>> 
>>> This I don't understand. The proposal only handles whole days as one number.
>> 
>> Right.  Only full days.  (The related observation is that these are 
>> always in the local time of some context that is not expressed, which 
>> is rather different from our time tags.)
>> 
>>> Another thing to consider:
>>> We should mention that this tag(s) use the proleptic Gregorian 
>>> calendar. So that dates before the Gregorian calendar have a unique semantics.
>> 
>> Good point.  In 7049bis, we just say:
>> 
>> Negative values (major type 1 and negative floating-point numbers) 
>> are interpreted as determined by the application requirements as 
>> there is no universal standard for UTC count-of-seconds time before 
>> 1970-01-01T00:00Z (this is particularly true for points in time that 
>> precede discontinuities in national calendars).  [.]
>> 
>> That is less of a problem on the date-only side (as long as dates change on local midnight. and not noon), so we may be able to be more specific.
>> 
>> 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
>> 
>> _______________________________________________
>> 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