Re: [netmod] Simple date in 6991bis-02

Balázs Lengyel <balazs.lengyel@ericsson.com> Mon, 23 March 2020 08:07 UTC

Return-Path: <balazs.lengyel@ericsson.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AE7163A08B5 for <netmod@ietfa.amsl.com>; Mon, 23 Mar 2020 01:07:12 -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=ericsson.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 nHuTwvgNrOqY for <netmod@ietfa.amsl.com>; Mon, 23 Mar 2020 01:07:08 -0700 (PDT)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2086.outbound.protection.outlook.com [40.107.20.86]) (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 0134E3A08A6 for <netmod@ietf.org>; Mon, 23 Mar 2020 01:07:07 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; =?utf-8?q?b=3DRilcPWT4by2F5Th9263PQya1ALjO513ExD5UWYJVEBLtMvV02MKGB8rBuOCN8?= =?utf-8?q?JXoRkyVs5qfRjzECe6W+xVN3vw1O+7yDM0fPMdG4lX1PXj78yKRrGwvz50w1nfZ+t?= =?utf-8?q?Od3hXbt0dVKK5nzuIp8eoFWbUVOISt60gUu4f860iQm0m2hRde9aJGQzMX7zjgNtu?= =?utf-8?q?kSdGABEHOBfP4JzW1rSsmdyeMZdUHD9dvIv5eWS7bLFSyEHmdMjpdegMrKS7anHj3?= =?utf-8?q?d7EMsJ2qZNRE6DeJ9kATGV5rQTuTvsuxCPBMEl6O0qDlC6JyODwAbxfits9GNeBQh?= =?utf-8?q?W85/UzsOI/mxmbm4QAWYw=3D=3D?=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; =?utf-8?q?h=3DFrom=3ADate=3ASubject=3AMessage-ID=3ACont?= =?utf-8?q?ent-Type=3AMIME-Version=3AX-MS-Exchange-SenderADCheck=3B?= =?utf-8?q?bh=3D1YKDaFXAUYMdN48MuJht3UM3EPtbgVNA8nia4+95j20=3D=3B_b=3Ddc73+q?= =?utf-8?q?NAnko/lbdXHh1S+PdDQeoX8dJeVamsItVk6PL1N3KyiOsVCubYGJX8Uj69Y0stJ5M?= =?utf-8?q?g7qKTwtnYrxYLbMqVkgCjTA7cxunX1Qbqnogfi5g8ZfN/IIvGuJUGnIjS4E2vlvXf?= =?utf-8?q?J27rcjGuM7hnWupv18IJPeGNinyUG7sYRnQvoUnELGVL7ktT+681E+BeecJ4kAvOf?= =?utf-8?q?zO1gX8PCOBN0OoeJJvapHflCYsuPhujQNSqMzBi32WFfiYko1hKVzU1SE+Z8wIaRA?= =?utf-8?q?KIhypLoEgYB9H+iOcARZm4XCQJrUN044qOgidevm8Guq/hAZzY8BbIth/f6Wefnml?= =?utf-8?q?XvWaYOkLgqA=3D=3D?=
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; =?utf-8?q?h=3DFrom=3ADate=3ASubject=3AMessage-ID=3AContent-Typ?= =?utf-8?q?e=3AMIME-Version=3AX-MS-Exchange-SenderADCheck=3B?= =?utf-8?q?bh=3D1YKDaFXAUYMdN48MuJht3UM3EPtbgVNA8nia4+95j20=3D=3B_b=3DMGWtIx?= =?utf-8?q?jI1EhHBYXb0PvEuk8Ikls2RgqQW+8+I7wUDwVYnQqQmOtHRtx6dRiynuUeey6Y+As?= =?utf-8?q?Hpb3GNoxEaKQ/4rPbfotD/r43IrNx69C2x7ThRg8Xx/FcxGGPD2fDO2jQIBOrjz9W?= =?utf-8?q?hQT7DT8IcyTJ/0wGmQIxxxgCxEVO5NzWDjQ=3D?=
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com (52.134.97.155) by DB7PR07MB4837.eurprd07.prod.outlook.com (20.177.193.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.15; Mon, 23 Mar 2020 08:07:05 +0000
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::15cf:dc81:c6f4:aa0c]) by DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::15cf:dc81:c6f4:aa0c%7]) with mapi id 15.20.2856.015; Mon, 23 Mar 2020 08:07:05 +0000
From: =?iso-8859-1?Q?Bal=E1zs_Lengyel?= <balazs.lengyel@ericsson.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: "'netmod@ietf.org'" <netmod@ietf.org>
Thread-Topic: [netmod] Simple date in 6991bis-02
Thread-Index: AdX94ScvCSiCS1jAR2imw4H6NNhKYgCrXBAAABa+LdA=
Date: Mon, 23 Mar 2020 08:07:05 +0000
Message-ID: =?utf-8?q?=3CDB7PR07MB40112001DBAD497526A55792F0F00=40DB7PR07MB4?= =?utf-8?q?011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
References: =?utf-8?q?=3CDB7PR07MB4011F0DD9804EC2896E6D854F0F40=40DB7PR07MB4?= =?utf-8?q?011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?= <20200322211228.mb7vxh55vcnxdhds@anna.jacobs.jacobs-university.de>
In-Reply-To: <20200322211228.mb7vxh55vcnxdhds@anna.jacobs.jacobs-university.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-originating-ip: [80.98.254.17]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: d58ae588-9c1c-489d-7000-08d7cf012d21
x-ms-traffictypediagnostic: DB7PR07MB4837:
x-microsoft-antispam-prvs: =?utf-8?q?=3CDB7PR07MB483771991B346DBC22D2FAD8F0F?= =?utf-8?q?00=40DB7PR07MB4837=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0351D213B3
x-forefront-antispam-report: SFV:NSPM; =?utf-8?q?SFS=3A=2810009020=29=284636?= =?utf-8?b?MDA5KSgzOTYwMDMpKDM0NjAwMikoMzk4NjA0MDAwMDIpKDEzNjAwMykoMzY2?= =?utf-8?b?MDA0KSgzNzYwMDIpKDE5OTAwNCkoNjY1NzQwMTIpKDU1MDE2MDAyKSg5Njg2?= =?utf-8?b?MDAzKSg3Njk2MDA1KSg2OTE2MDA5KSgzMTYwMDIpKDI5MDYwMDIpKDUyNTM2?= =?utf-8?b?MDE0KSg2NDc1NjAwOCkoNjY0NDYwMDgpKDY2NTU2MDA4KSg2Njk0NjAwNyko?= =?utf-8?q?66616009=29=2866476007=29=2886362001=29=2871200400001=29=28761160?= =?utf-8?b?MDYpKDU2NjAzMDAwMDIpKDQzMjYwMDgpKDMzNjU2MDAyKSgyNjAwNSkoODY3?= =?utf-8?b?NjAwMikoODExNTYwMTQpKDgxMTY2MDA2KSgxODYwMDMpKDQ3ODYwMDAwMSko?= =?utf-8?q?8936002=29=286506007=29=2853546011=29=3B?= DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR07MB4837; H:DB7PR07MB4011.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: =?utf-8?q?nIc7YmytaUOY3I4fB4wM44cTvbucLlN?= =?utf-8?q?h2gXuKeeKbuWbzUgucd7DdYabJy+WuOjuLQu2FYEMsZlUOrrWj0h6yd779rNceU/W?= =?utf-8?q?k5VwkzczNTia3dGKSO7FIu6pYrarxF4q+luWuZy1PlMq3wVO+/J5HSllXzQvAGff1?= =?utf-8?q?ZIpJLMzi91uwBIlibhPlWcEnr+Vtn0WcQzy17YDZzdxgDn9upuTO1sCc4T8liRJwi?= =?utf-8?q?1G92/CThA0YNFnOVLFexwOk0pyBvdWCq9FVnZixPLvzUsXxK8rhoF5CHoEf/EhHd0?= =?utf-8?q?ULFLo8yVHHSX+3Vzkpfg9XsDl8LAfXSZ+inIsV9jg3ZZ3vLLiItr2TLfCUuKSNbcq?= =?utf-8?q?7oFUXdszv1Ooz8qcC7ZcmxCqoUKWFZFqQi9JzfBoXIwWDhbEBNuw00wwgV/SAffOw?= =?utf-8?q?78QTygJZU0GiR3MScJnpWGNK+21jukTWwKYAfI617mPqfJ5BwhyOWNSSGXw0jm2ed?= =?utf-8?q?GbrKPWwvOBgC0VtNAXLcsXkw6lP17BXsWyInShSTFVYQ/R9g=3D=3D?=
x-ms-exchange-antispam-messagedata: =?utf-8?q?afZA8geyKoXe4+refq9uX4idXnkOyz?= =?utf-8?q?heW7Kul3NKA7h1TlOtFbn0BSaV7+8Dod8nCsnG+qb750fMuknlsCfAtshn+Tj6XfX?= =?utf-8?q?7syv9lLIIJbLxOtgrrDkxeyWD1Td9ucsyp6qa7adhjZ/J78DYckrS1Q=3D=3D?=
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=SHA1; boundary="----=_NextPart_000_015C_01D600F2.6B73B8C0"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d58ae588-9c1c-489d-7000-08d7cf012d21
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2020 08:07:05.4428 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: =?utf-8?q?FTyQU47VwnEBKFQLE3qP6?= =?utf-8?q?xtIjd58bkMw85Ivau2NRNhLa/bXASSYgcpi7u/4qv+RBHJ1fS/RlmjYiZLeiEALPp?= =?utf-8?q?7QltIF3fskH2zqY9U/ZaE=3D?=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB4837
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/dwKcbiwywgxbDSCUAIuKE7nK_pU>
Subject: Re: [netmod] Simple date in 6991bis-02
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Mar 2020 08:07:13 -0000

Thank you. I am happy with the answers. Balazs

-----Original Message-----
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> 
Sent: 2020. március 22., vasárnap 22:12
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: 'netmod@ietf.org' <netmod@ietf.org>
Subject: Re: [netmod] Simple date in 6991bis-02

On Thu, Mar 19, 2020 at 11:30:17AM +0000, Balázs Lengyel wrote:
> Hello,
> 
> This might have been discussed earlier, but I still find it strange 
> that the
> 
> 
>    typedef date {
> 
> has the timezone as a mandatory part. While I understand the issue 
> that when a day starts/ends is uncertain without the timezone, in real 
> life people practically never add the timezone to a date, and it does 
> not cause major problems. So IMHO following life we should have a 
> simple-date datatype that does not include any timezone. Actually we 
> do have that datatype just we called it revision-identifier. Really
strange.
>

I checked RFC 3339 again and it defines full-date without a timezone.
On the other hand, XML schema's definition of date seems to have an optional
timezone offset. I think following XML schema by making the timezone offset
optional is the right approach.

It might also be usefult to define time as a typedef. RFC 3339 defines
full-time with a mandatory timezone while XML schema defines time with
optional timezone. Again, I would follow XML schema here, making the
timezone offset optional for the time type as well.

> I would also consider to tighten up the pattern for 
> revision-identifier/date/date-and-time.
> 
>         pattern '\d{4}-(1[0-2]|0[1-9])-(0[1-9]|[1|2][0-9]|3[0-1])';
> 
> This would prohibit  2020-16-67 : months > 12 or days > 31

If we tighten the pattern, we should do this for date, date-and-time, and
revision. And then we should also tighten the revision offset, which
currently is \d{2}:\d{2}. And here things get interesting again.
RFC 3339 restricts the offset to 00-23 (hour) and 00-59 (minute). XML schema
says the hour is in 00-14 and the minute in 00-59. The spec says:

  Based on timezones currently in use, (c) could vary from
  2000-01-20T12:00:00+12:00 to 2000-01-20T12:00:00-13:00. It is,
  however, possible for this range to expand or contract in the
  future, based on local laws. Because of this, the following
  definition uses a somewhat broader range of indeterminate values:
  +14:00..-14:00.

Perhaps we should follow that approach. This would mean we have:

  typedef date {
    type string {
      pattern '\d{4}-(1[0-2]|0[1-9])-(0[1-9]|[1|2][0-9]|3[0-1])';
            + '(Z|[\+\-]((1[0-3]|0[0-9]):([0-5][0-9])|14:00))?';
    }
  }

Looking at the description and RFC 3339 again, I noticed a real problem or
bug in our definition: RFC 6991 says:

      [...] The canonical format for
      date values with an unknown time zone (usually referring
      to the notion of local time) uses the time-offset -00:00.

This is not consistent with what RFC 3339 says in section 4.3:

   If the time in UTC is known, but the offset to local time is unknown,
   this can be represented with an offset of "-00:00".

RFC 3339 seems to be silent about the situation where neither the offset to
UTC is unknown and I strongly dislike that the two specs differ in the
definition of the -00:00 semantics. I would call this a bug and fix it but
then others may claim this is an non-backwards compatible change...

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>