Re: A structured format for dates?

Tommy Pauly <tpauly@apple.com> Tue, 23 August 2022 13:30 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 A244AC1524B3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Aug 2022 06:30:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.33
X-Spam-Level:
X-Spam-Status: No, score=-8.33 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.571, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.com
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 FuBAZN3uN4AS for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Aug 2022 06:30:05 -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 5FAE8C14CF1C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 23 Aug 2022 06:30:04 -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 1oQTwZ-008Bmb-HM for ietf-http-wg-dist@listhub.w3.org; Tue, 23 Aug 2022 13:27:47 +0000
Resent-Date: Tue, 23 Aug 2022 13:27:47 +0000
Resent-Message-Id: <E1oQTwZ-008Bmb-HM@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <tpauly@apple.com>) id 1oQTwY-008Ble-C1 for ietf-http-wg@listhub.w3.org; Tue, 23 Aug 2022 13:27:46 +0000
Received: from ma1-aaemail-dr-lapp01.apple.com ([17.171.2.60]) by titan.w3.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <tpauly@apple.com>) id 1oQTwW-003TjX-Kr for ietf-http-wg@w3.org; Tue, 23 Aug 2022 13:27:45 +0000
Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.42/8.16.0.42) with SMTP id 27NDITLg026727; Tue, 23 Aug 2022 06:27:28 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=content-type : content-transfer-encoding : from : mime-version : subject : date : message-id : references : cc : in-reply-to : to; s=20180706; bh=1ObAVEF8m5RPpBQc3PVYQU3Px5Fwbsr5CZhIc2Qqdew=; b=ipUZPcU+72aQDm1r9SExB1baeIMeKB7nAbsIPmOf5T49X9CRydN2jPPzpiVqy/c1yYj+ ea85Qx2edwxTMnWKbpj9ByRGy5EXw/ilHXtGb4hhe8WCneK3p6dsB3kCwg8lynUCMWnx 2fzOljZnE/H/X6Jypbj8O0iNTM/0kdup/ljXQLKFcyaElGump+wCzIDaJeJf2c24Kzwe 69T7dH8Qc9wXurhurwQQoXfOchLHjP4Hbt54bqjgwAvJjWzKroDkm7lXm5piP4sXuGWK d3wK5+DzwmawOePlZ86ikruLPEhxBzYjFO5LvRyA9UxjqLdCk/vCuqvYaBuiwdbAQcGu bg==
Received: from ma-mailsvcp-mta-lapp01.corp.apple.com (ma-mailsvcp-mta-lapp01.corp.apple.com [10.226.18.133]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 3j2x93q9vr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 23 Aug 2022 06:27:28 -0700
Received: from ma-mailsvcp-mmp-lapp02.apple.com (ma-mailsvcp-mmp-lapp02.apple.com [17.32.222.15]) by ma-mailsvcp-mta-lapp01.corp.apple.com (Oracle Communications Messaging Server 8.1.0.19.20220711 64bit (built Jul 11 2022)) with ESMTPS id <0RH200334LDR2300@ma-mailsvcp-mta-lapp01.corp.apple.com>; Tue, 23 Aug 2022 06:27:28 -0700 (PDT)
Received: from process_milters-daemon.ma-mailsvcp-mmp-lapp02.apple.com by ma-mailsvcp-mmp-lapp02.apple.com (Oracle Communications Messaging Server 8.1.0.19.20220711 64bit (built Jul 11 2022)) id <0RH200W00KT9J900@ma-mailsvcp-mmp-lapp02.apple.com>; Tue, 23 Aug 2022 06:27:27 -0700 (PDT)
X-Va-A:
X-Va-T-CD: ca834fc1b48a1f28d8bca1d385f5e286
X-Va-E-CD: 02a6e54929b7e0e4d75cd752a781bf38
X-Va-R-CD: 4327496eb5c4ee01e8bbdba360a7b29c
X-Va-CD: 0
X-Va-ID: 82f411c0-e3f6-48e8-8ced-e93e5678febe
X-V-A:
X-V-T-CD: ca834fc1b48a1f28d8bca1d385f5e286
X-V-E-CD: 02a6e54929b7e0e4d75cd752a781bf38
X-V-R-CD: 4327496eb5c4ee01e8bbdba360a7b29c
X-V-CD: 0
X-V-ID: 8a8d7273-ad12-42af-bc09-5847350f9af4
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.895 definitions=2022-08-23_05:2022-08-22,2022-08-23 signatures=0
Received: from smtpclient.apple (unknown [17.235.99.41]) by ma-mailsvcp-mmp-lapp02.apple.com (Oracle Communications Messaging Server 8.1.0.19.20220711 64bit (built Jul 11 2022)) with ESMTPSA id <0RH200D7MLDP5A00@ma-mailsvcp-mmp-lapp02.apple.com>; Tue, 23 Aug 2022 06:27:26 -0700 (PDT)
Content-type: text/plain; charset="utf-8"
Content-transfer-encoding: quoted-printable
From: Tommy Pauly <tpauly@apple.com>
MIME-version: 1.0 (1.0)
Date: Tue, 23 Aug 2022 06:27:14 -0700
Message-id: <7B9BFDFF-337E-4CB8-8550-3D38EFD52160@apple.com>
References: <202208231056.27NAuWFY015133@critter.freebsd.dk>
Cc: Roberto Polli <robipolli@gmail.com>, Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>
In-reply-to: <202208231056.27NAuWFY015133@critter.freebsd.dk>
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
X-Mailer: iPhone Mail (20A356)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.895 definitions=2022-08-23_05:2022-08-22,2022-08-23 signatures=0
Received-SPF: pass client-ip=17.171.2.60; envelope-from=tpauly@apple.com; helo=ma1-aaemail-dr-lapp01.apple.com
X-W3C-Hub-DKIM-Status: validation passed: (address=tpauly@apple.com domain=apple.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-8.4
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1oQTwW-003TjX-Kr 6046924837d24ba13d22857acf930c7a
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/7B9BFDFF-337E-4CB8-8550-3D38EFD52160@apple.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40341
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>


> On Aug 23, 2022, at 4:00 AM, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
> 
> --------
> 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.

The numeric type is not only simpler to process for a computer, but also should be generally smaller on the wire, particularly if we have binary structured fields one day. The scale of that alone can have a great impact.

I imagine it’s also a lot easier to translate *to* the human readable / localized format for a date from the number, since the number is an unambiguous form. Parsing dates the other way (from human readable to machine readable) is where much of the complexity and ambiguity arises, so a scheme that only requires transformations in one direction seems preferable. 

Tommy (no hats)

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