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; b=RilcPWT4by2F5Th9263PQya1ALjO513ExD5UWYJVEBLtMvV02MKGB8rBuOCN8JXoRkyVs5qfRjzECe6W+xVN3vw1O+7yDM0fPMdG4lX1PXj78yKRrGwvz50w1nfZ+tOd3hXbt0dVKK5nzuIp8eoFWbUVOISt60gUu4f860iQm0m2hRde9aJGQzMX7zjgNtukSdGABEHOBfP4JzW1rSsmdyeMZdUHD9dvIv5eWS7bLFSyEHmdMjpdegMrKS7anHj3d7EMsJ2qZNRE6DeJ9kATGV5rQTuTvsuxCPBMEl6O0qDlC6JyODwAbxfits9GNeBQhW85/UzsOI/mxmbm4QAWYw==
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=1YKDaFXAUYMdN48MuJht3UM3EPtbgVNA8nia4+95j20=; b=dc73+qNAnko/lbdXHh1S+PdDQeoX8dJeVamsItVk6PL1N3KyiOsVCubYGJX8Uj69Y0stJ5Mg7qKTwtnYrxYLbMqVkgCjTA7cxunX1Qbqnogfi5g8ZfN/IIvGuJUGnIjS4E2vlvXfJ27rcjGuM7hnWupv18IJPeGNinyUG7sYRnQvoUnELGVL7ktT+681E+BeecJ4kAvOfzO1gX8PCOBN0OoeJJvapHflCYsuPhujQNSqMzBi32WFfiYko1hKVzU1SE+Z8wIaRAKIhypLoEgYB9H+iOcARZm4XCQJrUN044qOgidevm8Guq/hAZzY8BbIth/f6WefnmlXvWaYOkLgqA==
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; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;bh=1YKDaFXAUYMdN48MuJht3UM3EPtbgVNA8nia4+95j20=; b=MGWtIxjI1EhHBYXb0PvEuk8Ikls2RgqQW+8+I7wUDwVYnQqQmOtHRtx6dRiynuUeey6Y+AsHpb3GNoxEaKQ/4rPbfotD/r43IrNx69C2x7ThRg8Xx/FcxGGPD2fDO2jQIBOrjz9WhQT7DT8IcyTJ/0wGmQIxxxgCxEVO5NzWDjQ=
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: Balázs 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: <DB7PR07MB40112001DBAD497526A55792F0F00@DB7PR07MB4011.eurprd07.prod.outlook.com>
References: <DB7PR07MB4011F0DD9804EC2896E6D854F0F40@DB7PR07MB4011.eurprd07.prod.outlook.com> <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: <DB7PR07MB483771991B346DBC22D2FAD8F0F00@DB7PR07MB4837.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0351D213B3
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(346002)(39860400002)(136003)(366004)(376002)(199004)(66574012)(55016002)(9686003)(7696005)(6916009)(316002)(2906002)(52536014)(64756008)(66446008)(66556008)(66946007)(66616009)(66476007)(86362001)(71200400001)(76116006)(5660300002)(4326008)(33656002)(26005)(8676002)(81156014)(81166006)(186003)(478600001)(8936002)(6506007)(53546011); 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: nIc7YmytaUOY3I4fB4wM44cTvbucLlNh2gXuKeeKbuWbzUgucd7DdYabJy+WuOjuLQu2FYEMsZlUOrrWj0h6yd779rNceU/Wk5VwkzczNTia3dGKSO7FIu6pYrarxF4q+luWuZy1PlMq3wVO+/J5HSllXzQvAGff1ZIpJLMzi91uwBIlibhPlWcEnr+Vtn0WcQzy17YDZzdxgDn9upuTO1sCc4T8liRJwi1G92/CThA0YNFnOVLFexwOk0pyBvdWCq9FVnZixPLvzUsXxK8rhoF5CHoEf/EhHd0ULFLo8yVHHSX+3Vzkpfg9XsDl8LAfXSZ+inIsV9jg3ZZ3vLLiItr2TLfCUuKSNbcq7oFUXdszv1Ooz8qcC7ZcmxCqoUKWFZFqQi9JzfBoXIwWDhbEBNuw00wwgV/SAffOw78QTygJZU0GiR3MScJnpWGNK+21jukTWwKYAfI617mPqfJ5BwhyOWNSSGXw0jm2edGbrKPWwvOBgC0VtNAXLcsXkw6lP17BXsWyInShSTFVYQ/R9g==
x-ms-exchange-antispam-messagedata: afZA8geyKoXe4+refq9uX4idXnkOyzheW7Kul3NKA7h1TlOtFbn0BSaV7+8Dod8nCsnG+qb750fMuknlsCfAtshn+Tj6XfX7syv9lLIIJbLxOtgrrDkxeyWD1Td9ucsyp6qa7adhjZ/J78DYckrS1Q==
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: FTyQU47VwnEBKFQLE3qP6xtIjd58bkMw85Ivau2NRNhLa/bXASSYgcpi7u/4qv+RBHJ1fS/RlmjYiZLeiEALPp7QltIF3fskH2zqY9U/ZaE=
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/>