Re: [Cbor] Proposal for Date, Time and Time Zones

Richter, Jörg <Joerg.Richter@pdv-FS.de> Thu, 14 February 2019 12:49 UTC

Return-Path: <Joerg.Richter@pdv-FS.de>
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 6D1EC12F1A2 for <cbor@ietfa.amsl.com>; Thu, 14 Feb 2019 04:49:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.921
X-Spam-Level:
X-Spam-Status: No, score=-0.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FROM_EXCESS_BASE64=0.979] autolearn=no 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 J-Vz6Mi8GvyW for <cbor@ietfa.amsl.com>; Thu, 14 Feb 2019 04:49:11 -0800 (PST)
Received: from mail.pdv-fs.de (mail.pdv-fs.de [213.208.220.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4260913106D for <cbor@ietf.org>; Thu, 14 Feb 2019 04:49:10 -0800 (PST)
Received: from EXCHDB1.pdv-fs.de (192.168.180.94) by EXCHDB1.pdv-fs.de (192.168.180.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 14 Feb 2019 13:49:08 +0100
Received: from EXCHDB1.pdv-fs.de ([fe80::6c4a:8b1b:60f4:4437]) by EXCHDB1.pdv-fs.de ([fe80::6c4a:8b1b:60f4:4437%15]) with mapi id 15.01.1466.012; Thu, 14 Feb 2019 13:49:08 +0100
From: "Richter, Jörg" <Joerg.Richter@pdv-FS.de>
To: Carsten Bormann <cabo@tzi.org>
CC: "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: [Cbor] Proposal for Date, Time and Time Zones
Thread-Index: AdTEOszvWqEfqmNWRgi+93eO+W0ZPwACs1MAAAYxEOA=
Date: Thu, 14 Feb 2019 12:49:08 +0000
Message-ID: <151a780241b54397bdcdaf06d04668b1@pdv-FS.de>
References: <bd4d7f87e98b40d585eb7b4502d4b234@pdv-FS.de> <5105F5B3-258E-44B4-B756-2444BB336845@tzi.org>
In-Reply-To: <5105F5B3-258E-44B4-B756-2444BB336845@tzi.org>
Accept-Language: de-DE, en-US
Content-Language: de-DE
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [192.168.180.93]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/AIpXbTJ66rbXhezTQa5PcAK2C2w>
Subject: Re: [Cbor] Proposal for Date, Time and Time Zones
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: Thu, 14 Feb 2019 12:49:13 -0000

The main motivation for date and time of day is to just represent 
the semantic information.  Without a need to assign one or more points in time.

No one cares whether his birthday was 23, 24 or 25 hours long.  
Opening hours of stock exchanges are also just represented as a pair of clock times.
Of course, deriving concrete points in time requires always context information 
like the time zone of the stock exchange. But this information should not be 
part of the clock time.

As I see it, tag 1001 is useful for points in time.  I find it particularly 
good that decimal fractions can also be used. I am unsure about the negative
keys. Don't they do the same as a decimal fraction? And unusual scaling like 10^-7
cannot be used as is.  (Which is as it happens our internal resolution of
points in time and time of day)

I can't quite imagine how the concepts could be unified. Do you have an 
idea in mind?  All 4 types (timestamp, date, time of day, time zone) are used 
separately in our code.  To me it makes sense to represent them distinctly in CBOR.

About leap seconds: Now that I think about it, is tag 0 defined with leap seconds 
or without?  This might pose a problem (for us).  Anybody know what other 
encoders/decoders do?

> I’m interested in where the two
> different approaches would be used (and how to get the interval/periodic
> event function into tag 1001-1003).

I think I understand 1001.  And I think the two are different semantic concepts.
But I cannot find anything about tags 1002 and 1003.  The draft for 1001
does not contain much information about it.  Is there another document somewhere?

- Jörg