Re: A structured format for dates?

Poul-Henning Kamp <phk@phk.freebsd.dk> Tue, 23 August 2022 10:59 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 D7610C1524B3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Aug 2022 03:59:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.661
X-Spam-Level:
X-Spam-Status: No, score=-7.661 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] 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 p9pxkYdpDxki for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Aug 2022 03:59:38 -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 0C881C14CF1D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 23 Aug 2022 03:59:37 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1oQRaT-007mAE-Bc for ietf-http-wg-dist@listhub.w3.org; Tue, 23 Aug 2022 10:56:49 +0000
Resent-Date: Tue, 23 Aug 2022 10:56:49 +0000
Resent-Message-Id: <E1oQRaT-007mAE-Bc@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <phk@critter.freebsd.dk>) id 1oQRaS-007m9G-7J for ietf-http-wg@listhub.w3.org; Tue, 23 Aug 2022 10:56:48 +0000
Received: from phk.freebsd.dk ([130.225.244.222]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <phk@critter.freebsd.dk>) id 1oQRaQ-001apL-A8 for ietf-http-wg@w3.org; Tue, 23 Aug 2022 10:56:47 +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 2798C892AA; Tue, 23 Aug 2022 10:56:33 +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 27NAuWoI015134 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 23 Aug 2022 10:56:32 GMT (envelope-from phk@critter.freebsd.dk)
Received: (from phk@localhost) by critter.freebsd.dk (8.16.1/8.16.1/Submit) id 27NAuWFY015133; Tue, 23 Aug 2022 10:56:32 GMT (envelope-from phk)
Message-Id: <202208231056.27NAuWFY015133@critter.freebsd.dk>
To: Roberto Polli <robipolli@gmail.com>
cc: Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>
In-reply-to: <CAP9qbHUHf-FKVK09PXKO3RkzCU7pApZUKb1N5N1L0wNbWCqNeg@mail.gmail.com>
From: Poul-Henning Kamp <phk@phk.freebsd.dk>
References: <8C9C4A5C-45DB-43C0-9769-2A7510854AB1@mnot.net> <5CE5343D-EECB-4F25-A3DB-F300E7708656@mnot.net> <A94FB409-7D37-4B5E-894C-33E8CC4986D4@mnot.net> <502151A9-050A-4A46-AA1E-FC54751EBDC1@mnot.net> <CAP9qbHUFuUZKxX3uyFU1D5uUbV-UbVWum=EPxrvmd3Viyk1kVQ@mail.gmail.com> <202208230819.27N8Jk08053445@critter.freebsd.dk> <CAP9qbHUHf-FKVK09PXKO3RkzCU7pApZUKb1N5N1L0wNbWCqNeg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <15131.1661252191.1@critter.freebsd.dk>
Content-Transfer-Encoding: quoted-printable
Date: Tue, 23 Aug 2022 10:56:32 +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 1oQRaQ-001apL-A8 4e7f14abc36085f1725369b4f4fbd858
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/202208231056.27NAuWFY015133@critter.freebsd.dk>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40340
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>

--------
Roberto Polli writes:
> Hi Poul-Henning,
>
> Il giorno mar 23 ago 2022 alle ore 10:19 Poul-Henning Kamp
> <phk@phk.freebsd.dk> ha scritto:
> > > Just tried to get some more feedback on twitter on the topic
> > > https://twitter.com/ioggstream/status/1561752931417952258
> > > feel free to RT.
>
> > Making timestamps human readable is pointless, because, statistically
> > speaking, no humans ever read these headers in the raw.
> While statistically speaking humans do not read headers nor contents,
> not having a human readable format for dates will just lead people that
> cares for readability to:
>
> - either continue using HTTP-date;
> - or using a generic ISO8601 string, e.g. "2020-02-02T10:10:10+01:00".

And they are welcome to do that, so what's the problem ?

Again: Not even one out of a billion HTTP headers is ever read by a human,
so insisting on human readability makes no sense.

For that one out of a billion, there is absolutely nothing preventing tools,
for instance the browsers "developer tools" from nice-printing the field
as human-readable.

> > The necessary handling of leap-second is complex and a layer-violation.
>
> Syslog does not use them
> https://www.rfc-editor.org/rfc/rfc5424.html#section-6.2.3

A: What does that have to do with anything ?

B: That is a really bad (13 year old!) choice, in a world where people have
   started to apply leap-smearing and other platform-level mitigations of
   leap-seconds.

Both HTTP and Syslog should transmit whatever time the platform provides,
respecting whatever leap-second handling that platfrom has decided to apply.

> > And finally: it is much more expensive in terms of CPU power.
>
> This makes the more computationally intensive HTTP-date
> the only human readable option.

I literally dont know what that means ?

If only one out of a billion HTTP date headers are ever read by a
human, and that is probably way overestimated, then clearly the
extra processing cost of humanizing the field value should be
borne only by those requests ?

> In general, I am not sure whether CPU power issues should be addressed at
> a different level than field content (e.g. at messaging level) since it is
> not possible to predict the spillovers of those micro-optimizations:
> honestly I have no data on that. This is an interesting topic that
> needs further (and proper) investigation though.

Well /I/ have experience with that, quite a lot in fact, and I'm
telling you that converting to and from "human" timestamp format
is a massive waste of computing power.

...in particular when we are talking about a globally load-bearing protocol like HTTP.

Poul-Henning


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