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

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Sun, 22 March 2020 21:12 UTC

Return-Path: <J.Schoenwaelder@jacobs-university.de>
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 838863A0857 for <netmod@ietfa.amsl.com>; Sun, 22 Mar 2020 14:12:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.699
X-Spam-Level:
X-Spam-Status: No, score=-1.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, MSGID_FROM_MTA_HEADER=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=jacobsuniversity.onmicrosoft.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 u7rs8sHDV2qK for <netmod@ietfa.amsl.com>; Sun, 22 Mar 2020 14:12:34 -0700 (PDT)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60061.outbound.protection.outlook.com [40.107.6.61]) (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 78EA03A0858 for <netmod@ietf.org>; Sun, 22 Mar 2020 14:12:32 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; =?utf-8?q?b=3DX0TaCggXVGKO3ZCvSCXQxXW7uue1fMHV32n64STB4DRR7K8wKph4E4KdPrAD9?= =?utf-8?q?a54zG5fvTPHE7IlfaPDdPRuLgE8f5MlYHx7MhrXflL9My2hY0u65zdem3f5y6H+R1?= =?utf-8?q?m8rswaMVZl4fUSOteXu+PUlZy409gZ+BdntiOijjF0yVahq7/e0LtnG3FLnR7D7Su?= =?utf-8?q?u4XoKTW5WHPCsDLwn0lW1HjzUCCKAdQs7SyFKRiASQus1QLj6httgZ9krB/dO1u6t?= =?utf-8?q?+t2D/ddXIbAnsYoSf+2PTsLZMKqon6ClFA765Mtz/dbxCKTx5YJQs5+p++CCg6B+Y?= =?utf-8?q?N+ni6VcWMhMY/S92FERJg=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=3Dy+jPJILXn7YiRXmWH0UBOhNKN5puDTAxvO9L+qqpgpI=3D=3B_b=3DccbUzt?= =?utf-8?q?pb+lSBjqWW5Mi6ts9Hv4zdfGErhPs8Zfw2a3jqts6q1Bs1K02lm1N6Kt3lJ9m7mbC?= =?utf-8?q?xB8bZ223us5+SRjmZQD6RNYXu3qOFrmD+RAdG6kdwbXbah2CX6SjY/65j/Vmp6PR9?= =?utf-8?q?BBBanXSXX7ld984dpLMq4/pDqzgcuNwmqZyHr5owarzz9EjxH+2+5wgO/M2CeZE6+?= =?utf-8?q?9b+/Jm+oywefx5yvNz7a7spGZzm0I/SbpoHKAqIOXqrTu2GyPxzmqly+9xK8zW3O2?= =?utf-8?q?1RV9rd8jH3tnYZDhnf9HPVriZjBE3M51juotbFpWJG6PdOKE/dRajLfh+Crzqb7Et?= =?utf-8?q?rH+lobHN79w=3D=3D?=
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jacobs-university.de; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; =?utf-8?q?h=3DFrom=3ADate=3AS?= =?utf-8?q?ubject=3AMessage-ID=3AContent-Type=3AMIME-Version=3AX-MS-Exchange?= =?utf-8?q?-SenderADCheck=3B?= =?utf-8?q?bh=3Dy+jPJILXn7YiRXmWH0UBOhNKN5puDTAxvO9L+qqpgpI=3D=3B_b=3DK/SPwv?= =?utf-8?q?G7tcAws4Gi2fDs9n0D4d0X/KIGQPKOhgYL7LTDzPv9JJSFVcQWtnhNeyq/AwoGPMB?= =?utf-8?q?LXdl1/Kcn3RLNpgt1IoEH2BXCij4dzdl+6h11ZTrUs/ZfbaEfd/I0CU3Ql9OO+dh2?= =?utf-8?q?jU+HoCF22iL7FlMgcUwHvCX2dYvUOucxCMY=3D?=
Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=J.Schoenwaelder@jacobs-university.de;
Received: from DB6P190MB0310.EURP190.PROD.OUTLOOK.COM (10.165.186.141) by DB6P190MB0005.EURP190.PROD.OUTLOOK.COM (10.172.228.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Sun, 22 Mar 2020 21:12:30 +0000
Received: from DB6P190MB0310.EURP190.PROD.OUTLOOK.COM ([fe80::b999:3826:8a06:8653]) by DB6P190MB0310.EURP190.PROD.OUTLOOK.COM ([fe80::b999:3826:8a06:8653%6]) with mapi id 15.20.2835.021; Sun, 22 Mar 2020 21:12:30 +0000
Date: Sun, 22 Mar 2020 22:12:28 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: =?utf-8?Q?Bal=C3=A1zs?= Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>
Cc: "'netmod@ietf.org'" <netmod@ietf.org>
Message-ID: <20200322211228.mb7vxh55vcnxdhds@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: =?utf-8?Q?Bal=C3=A1zs?= Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>, "'netmod@ietf.org'" <netmod@ietf.org>
References: =?utf-8?q?=3CDB7PR07MB4011F0DD9804EC2896E6D854F0F40=40DB7PR07MB4?= =?utf-8?q?011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: =?utf-8?q?=3CDB7PR07MB4011F0DD9804EC2896E6D854F0F40=40DB7PR07MB?= =?utf-8?q?4011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
X-ClientProxiedBy: ZR0P278CA0018.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::28) To DB6P190MB0310.EURP190.PROD.OUTLOOK.COM (2603:10a6:6:3e::13)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2001:638:709:5::7) by ZR0P278CA0018.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Sun, 22 Mar 2020 21:12:29 +0000
X-Originating-IP: [2001:638:709:5::7]
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 2f52ed77-3fd1-449e-8a1a-08d7cea5bac4
X-MS-TrafficTypeDiagnostic: DB6P190MB0005:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS: =?utf-8?q?=3CDB6P190MB0005EA93EB1EBDB0C7C53B7FDEF?= =?utf-8?q?30=40DB6P190MB0005=2EEURP190=2EPROD=2EOUTLOOK=2ECOM=3E?=
X-MS-Oob-TLC-OOBClassifiers: OLM:9508;
X-Forefront-PRVS: 0350D7A55D
X-Forefront-Antispam-Report: SFV:NSPM; =?utf-8?q?SFS=3A=2810009020=29=283460?= =?utf-8?b?MDIpKDM3NjAwMikoMTM2MDAzKSgzNjYwMDQpKDM5ODUwNDAwMDA0KSgzOTYwMDMp?= =?utf-8?b?KDE5OTAwNCkoNTIxMTYwMDIpKDE2NTI2MDE5KSgxODYwMDMpKDY0OTYwMDYpKDY2?= =?utf-8?b?NTc0MDEyKSgxMDc2MDAzKSg0MzI2MDA4KSg4NjM2MjAwMSkoNzg2MDAzKSg2?= =?utf-8?q?486002=29=2866556008=29=2866476007=29=28478600001=29=28316002=29?= =?utf-8?q?=288936002=29=2866946007=29=285660300002=29=283450700001=29=28811?= =?utf-8?q?56014=29=288676002=29=2881166006=29=282906002=29=3B?= DIR:OUT; SFP:1101; SCL:1; SRVR:DB6P190MB0005; H:DB6P190MB0310.EURP190.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1;
Received-SPF: None (protection.outlook.com: jacobs-university.de does not designate permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: =?utf-8?q?yLsQXsOnicphGrOPqkDZzh5t957ZbgQ?= =?utf-8?q?0Z7OD4qbckz7SV+w5wZa+A1lR7gKje76B6711JzqGUlzGY5T3tOAKjJCioMWo4zig?= =?utf-8?q?mprsOc2vcLo2QQPIdTdCD/7N1NP8uULWTRd4bCHyXi0+nOkNeKoV918gadNcxB2Ep?= =?utf-8?q?hU28q48QsyFRVSYMmAE0ly2b/oMksor0y1oRJSG1dUPQXBtXwXLsDjY32MN/yievD?= =?utf-8?q?BigTBHOnZUf09rN8YR7dnQIzbpJPD1DkolVpeVj8Xvf61XZJsZx1s6btBY4LxO8uB?= =?utf-8?q?+dai4sNfiUfFn8k7VN2zNg6gNQdmfsM+MRa6Cs6uj5gxG54uwjYa0IketQefjcfKZ?= =?utf-8?q?bVK0XjnMxZIr3QpVEixpTo7Xr29Avkoi4uHDtVGLNrOzLZCBEHzDCleWTAHHLmC0x?= =?utf-8?q?QzkINQgKxgcRZBWYQMtwu+0EDREajQqCcGpgmM6gystLSUL1VSimEKJ8Fuhyo3cUz?= =?utf-8?q?+UwVJwca8yG/4u4YeCI4gi/30gK9mHqio8oTM4mbrXZFx12g=3D=3D?=
X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?rtbhl9CqM0My9vVppzAhmw7Vewrfwp?= =?utf-8?q?hM5+5WplDOeRlH9kZohY2K9fU4cZweJNavPZwHd2Bt5va5x56l/kbjVNYuAtW4NTz?= =?utf-8?q?2ZI/48RfmpDaa2P790GoYiXgnv+OVMlHrhvfledx2MlvFIJIHewl5SArnQZVD0mVL?= =?utf-8?q?H15mWjeqPzc=3D?=
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 2f52ed77-3fd1-449e-8a1a-08d7cea5bac4
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2020 21:12:29.8770 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: =?utf-8?q?7QbvW4hCNQ9TPKevUlORZ?= =?utf-8?q?0M22xwIUqyxl5iZ4fT7BkutCzh8VdpffkOSLyu9T2B36zNiYsnKX28/NsbvBXTxS0?= =?utf-8?q?rnMfDRN2lcxq9uufCDOp4=3D?=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6P190MB0005
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/jxSBp4kGR0rXmsmL5RX8GoMbkB8>
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: Sun, 22 Mar 2020 21:12:37 -0000

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/>