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; b=X0TaCggXVGKO3ZCvSCXQxXW7uue1fMHV32n64STB4DRR7K8wKph4E4KdPrAD9a54zG5fvTPHE7IlfaPDdPRuLgE8f5MlYHx7MhrXflL9My2hY0u65zdem3f5y6H+R1m8rswaMVZl4fUSOteXu+PUlZy409gZ+BdntiOijjF0yVahq7/e0LtnG3FLnR7D7Suu4XoKTW5WHPCsDLwn0lW1HjzUCCKAdQs7SyFKRiASQus1QLj6httgZ9krB/dO1u6t+t2D/ddXIbAnsYoSf+2PTsLZMKqon6ClFA765Mtz/dbxCKTx5YJQs5+p++CCg6B+YN+ni6VcWMhMY/S92FERJg==
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=y+jPJILXn7YiRXmWH0UBOhNKN5puDTAxvO9L+qqpgpI=; b=ccbUztpb+lSBjqWW5Mi6ts9Hv4zdfGErhPs8Zfw2a3jqts6q1Bs1K02lm1N6Kt3lJ9m7mbCxB8bZ223us5+SRjmZQD6RNYXu3qOFrmD+RAdG6kdwbXbah2CX6SjY/65j/Vmp6PR9BBBanXSXX7ld984dpLMq4/pDqzgcuNwmqZyHr5owarzz9EjxH+2+5wgO/M2CeZE6+9b+/Jm+oywefx5yvNz7a7spGZzm0I/SbpoHKAqIOXqrTu2GyPxzmqly+9xK8zW3O21RV9rd8jH3tnYZDhnf9HPVriZjBE3M51juotbFpWJG6PdOKE/dRajLfh+Crzqb7EtrH+lobHN79w==
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; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;bh=y+jPJILXn7YiRXmWH0UBOhNKN5puDTAxvO9L+qqpgpI=; b=K/SPwvG7tcAws4Gi2fDs9n0D4d0X/KIGQPKOhgYL7LTDzPv9JJSFVcQWtnhNeyq/AwoGPMBLXdl1/Kcn3RLNpgt1IoEH2BXCij4dzdl+6h11ZTrUs/ZfbaEfd/I0CU3Ql9OO+dh2jU+HoCF22iL7FlMgcUwHvCX2dYvUOucxCMY=
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: Balázs 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: Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>, "'netmod@ietf.org'" <netmod@ietf.org>
References: <DB7PR07MB4011F0DD9804EC2896E6D854F0F40@DB7PR07MB4011.eurprd07.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <DB7PR07MB4011F0DD9804EC2896E6D854F0F40@DB7PR07MB4011.eurprd07.prod.outlook.com>
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: <DB6P190MB0005EA93EB1EBDB0C7C53B7FDEF30@DB6P190MB0005.EURP190.PROD.OUTLOOK.COM>
X-MS-Oob-TLC-OOBClassifiers: OLM:9508;
X-Forefront-PRVS: 0350D7A55D
X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(366004)(39850400004)(396003)(199004)(52116002)(16526019)(186003)(6496006)(66574012)(1076003)(4326008)(86362001)(786003)(6486002)(66556008)(66476007)(478600001)(316002)(8936002)(66946007)(5660300002)(3450700001)(81156014)(8676002)(81166006)(2906002); 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: yLsQXsOnicphGrOPqkDZzh5t957ZbgQ0Z7OD4qbckz7SV+w5wZa+A1lR7gKje76B6711JzqGUlzGY5T3tOAKjJCioMWo4zigmprsOc2vcLo2QQPIdTdCD/7N1NP8uULWTRd4bCHyXi0+nOkNeKoV918gadNcxB2EphU28q48QsyFRVSYMmAE0ly2b/oMksor0y1oRJSG1dUPQXBtXwXLsDjY32MN/yievDBigTBHOnZUf09rN8YR7dnQIzbpJPD1DkolVpeVj8Xvf61XZJsZx1s6btBY4LxO8uB+dai4sNfiUfFn8k7VN2zNg6gNQdmfsM+MRa6Cs6uj5gxG54uwjYa0IketQefjcfKZbVK0XjnMxZIr3QpVEixpTo7Xr29Avkoi4uHDtVGLNrOzLZCBEHzDCleWTAHHLmC0xQzkINQgKxgcRZBWYQMtwu+0EDREajQqCcGpgmM6gystLSUL1VSimEKJ8Fuhyo3cUz+UwVJwca8yG/4u4YeCI4gi/30gK9mHqio8oTM4mbrXZFx12g==
X-MS-Exchange-AntiSpam-MessageData: rtbhl9CqM0My9vVppzAhmw7VewrfwphM5+5WplDOeRlH9kZohY2K9fU4cZweJNavPZwHd2Bt5va5x56l/kbjVNYuAtW4NTz2ZI/48RfmpDaa2P790GoYiXgnv+OVMlHrhvfledx2MlvFIJIHewl5SArnQZVD0mVLH15mWjeqPzc=
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: 7QbvW4hCNQ9TPKevUlORZ0M22xwIUqyxl5iZ4fT7BkutCzh8VdpffkOSLyu9T2B36zNiYsnKX28/NsbvBXTxS0rnMfDRN2lcxq9uufCDOp4=
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/>