Re: [Cbor] draft-ietf-cbor-date-tag-02 - handling of time zone offsets

Carsten Bormann <cabo@tzi.org> Wed, 01 July 2020 08:18 UTC

Return-Path: <cabo@tzi.org>
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 3E31A3A0A96; Wed, 1 Jul 2020 01:18:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 V6InxyFWGDiP; Wed, 1 Jul 2020 01:18:33 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7221C3A0A8D; Wed, 1 Jul 2020 01:18:32 -0700 (PDT)
Received: from [172.16.42.112] (p5089ae91.dip0.t-ipconnect.de [80.137.174.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 49xYyZ0WVkzyRj; Wed, 1 Jul 2020 10:18:30 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20200701072123.hnyhzemagtotnuyl@anna.jacobs.jacobs-university.de>
Date: Wed, 01 Jul 2020 10:18:29 +0200
Cc: draft-ietf-cbor-date-tag@ietf.org, cbor@ietf.org
X-Mao-Original-Outgoing-Id: 615284309.5378031-5c6b4a6183d2e9bbde5487335db8542c
Content-Transfer-Encoding: quoted-printable
Message-Id: <DD477DBD-3F3F-48FA-BADC-FF550CC3D4F7@tzi.org>
References: <20200701072123.hnyhzemagtotnuyl@anna.jacobs.jacobs-university.de>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/0qZL4hU_uWazoOUJJs6kvGES_ZQ>
Subject: Re: [Cbor] draft-ietf-cbor-date-tag-02 - handling of time zone offsets
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, 01 Jul 2020 08:18:38 -0000

Hi Juergen,

thank you for that comment.

There are two different concepts of “date", and I think the current draft needs to be more explicit that it is about one and not the other.

> On 2020-07-01, at 09:21, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> Hi,
> 
> I just saw your CBOR date type and it seems it does not include a
> timezone offset. This means a date value does not represent a 24 hour
> time interval but something larger.

Well, it represents the abstract date, as opposed to a time period starting at 00:00 on that date and ending at 24:00, both in some time zone (which in practice may be 23, 24, 24.00028, or 25 hours).

Angela Merkel’s birthday was 1954-07-17.  You will find that on her passport.  The passport will be mute about the time zone in which she was born, as that is irrelevant to the identification principle.  (Other example: I was born at 00:05 UTC, but that doesn’t mean I have a different birthday in New York, where that specific instant would have been 20:05 the previous day, I think.)

> XML schema's date type allows the
> optional inclusion of a timezone offset.

Which is useful when you want to convert a date into that ~24-hour time period.

> The date definition in
> draft-ietf-netmod-rfc6991-bis-03.txt (still under discussion) includes
> a mandatory timezone offset (since it was already mandatory for
> date-and-time). I do not know whether we should have a common approach
> for this.

I think there is a use case for these periods (see also draft-bormann-cbor-time-tag for a little more about periods, even though we haven’t started to flesh out that part of the spec).  It is not the one addressed by these tags.

> Note that your 'number of days since the epoch 1970-01-01 does not
> really say 1970-01-01T00:00:00 and also leaves it open whether this is
> calculated in UTC or not (on Unix-like systems, time is usually
> counted in UTC).

It doesn’t have to, as it talks about the date, not the anchoring in a time scale of the start and end of the period covering that date in a specific time zone.

Joerg’s original proposal has a separate tag for time zone, which (with the time zone data base and, depending on the time scale, information about leap seconds) may be used to do the conversion.  This is not included in the current draft, because the use case is for abstract dates, but it certainly will be addressed by some future tags.

Grüße, Carsten