Re: A structured format for dates?

Mark Nottingham <mnot@mnot.net> Wed, 24 August 2022 03:14 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 BD891C1524A8 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Aug 2022 20:14:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.759
X-Spam-Level:
X-Spam-Status: No, score=-7.759 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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=mnot.net header.b=Fa9XbBv5; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=jP3xbdC5
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 lubWj2_fJJ8m for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Aug 2022 20:14:45 -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 101B0C1522A7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 23 Aug 2022 20:14:44 -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 1oQgo4-00ABKk-R3 for ietf-http-wg-dist@listhub.w3.org; Wed, 24 Aug 2022 03:11:52 +0000
Resent-Date: Wed, 24 Aug 2022 03:11:52 +0000
Resent-Message-Id: <E1oQgo4-00ABKk-R3@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 <mnot@mnot.net>) id 1oQgo2-00ABJr-Iu for ietf-http-wg@listhub.w3.org; Wed, 24 Aug 2022 03:11:50 +0000
Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by titan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <mnot@mnot.net>) id 1oQgo0-003niT-K4 for ietf-http-wg@w3.org; Wed, 24 Aug 2022 03:11:50 +0000
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B2B975C0049; Tue, 23 Aug 2022 23:11:37 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 23 Aug 2022 23:11:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1661310697; x= 1661397097; bh=ss59qP8NQSq8vTcURr089gMFErx8Je4vrUy/+d+m/q0=; b=F a9XbBv5FN5EQw843sqlP4b/ohTlD2rcYnpU29mTtUGtycSdHYpL2P1QCCpPo3+FO /w8/B31mMFjIiEAkFQ1P388oW7OY3eDl4GxdQlFKWZFcxOS9ug2f1e8GChOaqjqv 3+pFbAkxlXNtjCN2nwU6Jo+DvAvjXZSW7uiXjvxx3EmjGR4isvnGcTXdBQkAjv4+ OIbVCUi3UxJoV3a5D2WRYvE9lnVXvqBkvO3IA0CeIWve4Ufoo3PDbmsPLIhgyWfx 7sZbAscIixKiLYa1f/Ysm57uJDW4QANQOeQn4M2ltw/4R26juZO5SAjYskqaki60 aFyQE2UjbQW37C7f2+ztg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1661310697; x= 1661397097; bh=ss59qP8NQSq8vTcURr089gMFErx8Je4vrUy/+d+m/q0=; b=j P3xbdC5AtY1I8O2H84F7G7NoU456YW9W7htGE4WMZBfuR1RjEteWkKAnuLUpPYij N41Kklx0WJLSrTGzDTqABemeCh/xfGbn2qs0w1e/JhWSzidRE4f7yY2yo6rXyjcY IHQq7S6rqz3GKkBhObODQ4pJ6vA+lOtQP703WmxR3g2ZAHXZTSRXZKYaQ++Eh8B9 D9HnS7YJAsONmK2U/mK+h3Z7q24fO4eRZbylZ/Ldyj7bVYHrUL/PfcRQuV6BGLto m2HYognwexiNK3nc0vLyuN43ljwJh7Nt3WuthFk2ISlHOQzdReND6oHfZ5A9IhJX AWocN8BwDofPENr4vhCIg==
X-ME-Sender: <xms:6JYFYwZeQn_55wFnFjvIClh5YKKU3Llh1jbR24I7Is3aG29gcHjjLw> <xme:6JYFY7aIOfkNgwAS-5BUMvrx4AvganVj7XccXdwr8Gni8OYGb1wp4rYE4EtjeJklq hpaI372SmaFeY8KaA>
X-ME-Received: <xmr:6JYFY68Re6FfoBM7IbI4WBYJI8bUlVMve15Ni2TO0qAQ9M1_7gzxRuYxmDAe4_2PAplR>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejtddgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpeforghr khcupfhothhtihhnghhhrghmuceomhhnohhtsehmnhhothdrnhgvtheqnecuggftrfgrth htvghrnhepfefhhfelleejjeejieekhfejfeeiheetgeejgffhudegveeigeehgefftdet udetnecuffhomhgrihhnpehmnhhothdrnhgvthenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmnhhothesmhhnohhtrdhnvght
X-ME-Proxy: <xmx:6JYFY6otgaeYGB0zSnDh2v6T5CbW7AXUm5RWNYSAixbyt1RkMrfTdA> <xmx:6JYFY7rxAiJDAmcHyq4wFVWqIbHJmOthiVplb8_RM6ESdglfx6i57Q> <xmx:6JYFY4SkzMT0MiYt-NrqB00wOATOA5lQX_rY-qwyd4PAyerQVUWcjA> <xmx:6ZYFYy28MGlVhzikNEh0dgEcYwchTPf62BjP24sOaClx_hwBJGO2eA>
Feedback-ID: ie6694242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Aug 2022 23:11:35 -0400 (EDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <7B9BFDFF-337E-4CB8-8550-3D38EFD52160@apple.com>
Date: Wed, 24 Aug 2022 13:11:31 +1000
Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Roberto Polli <robipolli@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <685890F9-9F68-41EF-AC8C-86ACAD074A38@mnot.net>
References: <202208231056.27NAuWFY015133@critter.freebsd.dk> <7B9BFDFF-337E-4CB8-8550-3D38EFD52160@apple.com>
To: Tommy Pauly <tpauly@apple.com>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
Received-SPF: pass client-ip=66.111.4.29; envelope-from=mnot@mnot.net; helo=out5-smtp.messagingengine.com
X-W3C-Hub-DKIM-Status: validation passed: (address=mnot@mnot.net domain=mnot.net), signature is good
X-W3C-Hub-DKIM-Status: validation passed: (address=mnot@mnot.net domain=messagingengine.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-9.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1oQgo0-003niT-K4 c1776ce993272466dc9a0b1ae174a1b3
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/685890F9-9F68-41EF-AC8C-86ACAD074A38@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40344
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>

Personal response - 

> On 23 Aug 2022, at 11:27 pm, Tommy Pauly <tpauly@apple.com> wrote:
> 
> 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.

It's important to remember that if/when we have binary structured fields, the binary wire representation can be different from the textual one we're defining now -- for example, it could be the same as that of an integer, but with a different type flag. 

What we're defining now is merely what the _textual_ (HTTP/1.1-ish) representation of a date is. The underlying data model for dates is separable (see below), as is its mapping to other serialisations of structured types.

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

That entirely relies upon the precision of the underlying data model and the rules for transforming it to/from the textual representation. In the previous PR, the underlying data model was an integer, and the rules were fairly precise, so I don't think this is a strong reason to go this way.

This is why I'm not terribly convinced by the arguments for an integer textual representation so far; I think we can have the best of both worlds (integer data model / human-friendly textual representation) *if* we believe that binary structured fields are going to happen. IMO the only reason we'd choose an integer textual representation is if we didn't believe that. 

Cheers,

--
Mark Nottingham   https://www.mnot.net/