Re: A structured format for dates?

Poul-Henning Kamp <phk@phk.freebsd.dk> Fri, 17 June 2022 06:23 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B28CCC13C2F3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 16 Jun 2022 23:23:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.662
X-Spam-Level:
X-Spam-Status: No, score=-2.662 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K-Ox3QKkRJOR for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 16 Jun 2022 23:23:06 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 86304C13C2EF for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 16 Jun 2022 23:23:05 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1o25L2-0006ne-Lg for ietf-http-wg-dist@listhub.w3.org; Fri, 17 Jun 2022 06:20:12 +0000
Resent-Date: Fri, 17 Jun 2022 06:20:12 +0000
Resent-Message-Id: <E1o25L2-0006ne-Lg@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <phk@critter.freebsd.dk>) id 1o25L0-0006mK-Kx for ietf-http-wg@listhub.w3.org; Fri, 17 Jun 2022 06:20:10 +0000
Received: from phk.freebsd.dk ([130.225.244.222]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <phk@critter.freebsd.dk>) id 1o25Kz-0004il-32 for ietf-http-wg@w3.org; Fri, 17 Jun 2022 06:20:10 +0000
Received: from critter.freebsd.dk (unknown [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id 59FD289298; Fri, 17 Jun 2022 06:19:56 +0000 (UTC)
Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.16.1/8.16.1) with ESMTPS id 25H6K1JK064729 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 17 Jun 2022 06:20:01 GMT (envelope-from phk@critter.freebsd.dk)
Received: (from phk@localhost) by critter.freebsd.dk (8.16.1/8.16.1/Submit) id 25H6K130064728; Fri, 17 Jun 2022 06:20:01 GMT (envelope-from phk)
Message-Id: <202206170620.25H6K130064728@critter.freebsd.dk>
To: Mark Nottingham <mnot@mnot.net>
cc: HTTP Working Group <ietf-http-wg@w3.org>
In-reply-to: <D75FF815-87B5-4471-B517-E52D333BE666@mnot.net>
From: "Poul-Henning Kamp" <phk@phk.freebsd.dk>
References: <8C9C4A5C-45DB-43C0-9769-2A7510854AB1@mnot.net> <202206160546.25G5k0KR056033@critter.freebsd.dk> <B34DEE15-DE14-4DC2-B6D0-F0CD1823EC30@mnot.net> <20220616062211.GA28947@1wt.eu> <C1814D1B-D048-4A03-9C26-1BC2E20334A9@bzfx.net> <202206162206.25GM6EPJ063104@critter.freebsd.dk> <24E6D32B-C733-4FA3-B052-898BB86ECFDD@bzfx.net> <202206170531.25H5VnMD064477@critter.freebsd.dk> <D75FF815-87B5-4471-B517-E52D333BE666@mnot.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <64726.1655446801.1@critter.freebsd.dk>
Date: Fri, 17 Jun 2022 06:20:01 +0000
Received-SPF: pass client-ip=130.225.244.222; envelope-from=phk@critter.freebsd.dk; helo=phk.freebsd.dk
X-W3C-Hub-Spam-Status: No, score=-4.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1o25Kz-0004il-32 30ee496d3bab7824daef20228b5c4321
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/202206170620.25H6K130064728@critter.freebsd.dk>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40146
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

--------
Mark Nottingham writes:

> If dates are their own distinct data type in SF, the underlying data 
> model would still be an integer or decimal, but it would self-identify 
> as a date, so that tooling could identify it as such automatically.

If we did, we would just progress to the next level where the
question becomes:  What about time-intervals like "age", should
they also be so tagged so they can be presented as "45m32s" ?

We did not make SF context-free, you need to know what you are
looking for to parse it correctly, so needing to know that some
sf-decimals are timestamps is totally in character.

(If we settle on sf-decimal to support fractional seconds, the
precense of the period and the magnitude of the integer part will
be a very solid heuristic for opportunistic pretty-printing.)

Of course if almost nobody actually uses fractions, the extra ".0"
is just wasted overhead, 11 bits in HPACK, but even then, a sf-decimal
is still shorter and compresses considerably better than ISO-8601
timestamps would do.

Therefore I prefer sf-decimal, but I can live with sf-integer.

Introducing ISO 8601 as yet another textual timestamp format,
offering no upside over the three already codified textual timestamp
formats, would be not only pointless, it would be a regression, for
instance in terms of HPACK efficiency.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.