Re: A structured format for dates?

Justin Richer <jricher@mit.edu> Wed, 24 August 2022 16:35 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 29B2BC14CF0B for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Aug 2022 09:35:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.76
X-Spam-Level:
X-Spam-Status: No, score=-2.76 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_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_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mit.edu
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 1BjABxU2ZKiy for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Aug 2022 09:35:50 -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 4DF99C14F74A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 24 Aug 2022 09:35:50 -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 1oQtJF-00CCpu-3e for ietf-http-wg-dist@listhub.w3.org; Wed, 24 Aug 2022 16:32:53 +0000
Resent-Date: Wed, 24 Aug 2022 16:32:53 +0000
Resent-Message-Id: <E1oQtJF-00CCpu-3e@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 <jricher@mit.edu>) id 1oQtJD-00CCox-8g for ietf-http-wg@listhub.w3.org; Wed, 24 Aug 2022 16:32:51 +0000
Received: from outgoing-exchange-3.mit.edu ([18.9.28.13]) by titan.w3.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <jricher@mit.edu>) id 1oQtJB-00495p-6N for ietf-http-wg@w3.org; Wed, 24 Aug 2022 16:32:50 +0000
Received: from oc11exedge2.exchange.mit.edu (OC11EXEDGE2.EXCHANGE.MIT.EDU [18.9.3.18]) by outgoing-exchange-3.mit.edu (8.14.7/8.12.4) with ESMTP id 27OGW5JW017568; Wed, 24 Aug 2022 12:32:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1661358749; bh=t0QDF6J6SDoIImsAl0hZzYo+TisK4FvUtfsVcIQuysI=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=ONCZSzR11nDaI+HHSvbg6ma6Qqse7oCvEdDldd7tnpjivurlEdjq3JOJsPG9xT9ji vzlpGvNH9OnV6I1E9p5JQ/7aT4DgMu4Qv/wVbCV9FwvjWsrIPVZ20+QJY33RocyTko 6Wh058rJH0+ihdW4DzpgViBP6O91h0oW/2WUKZpN9zWzxYDyvnvBAMA8Fs+5Wr+mk3 n5NNoYGsn7cIR9JY+pkRvsvDgdyU6RuCwijSN7bVLwdhkC2ZvLla2rX+7ebz1CneKb vw4wJ4afmbXB0qEwELSiW3oFUup9k+S3uCoHlvF8YpTAPljMPIBWYpmwkGUvhXOtRY uETPh7qheS8Aw==
Received: from w92expo26.exchange.mit.edu (18.7.74.32) by oc11exedge2.exchange.mit.edu (18.9.3.18) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Wed, 24 Aug 2022 12:31:59 -0400
Received: from oc11exhyb5.exchange.mit.edu (18.9.1.110) by w92expo26.exchange.mit.edu (18.7.74.32) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 24 Aug 2022 12:32:15 -0400
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by oc11exhyb5.exchange.mit.edu (18.9.1.110) with Microsoft SMTP Server (TLS) id 15.0.1497.36 via Frontend Transport; Wed, 24 Aug 2022 12:32:14 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kddR92tJTPtaX+0SjeYvC/bnV6OTY030hhiWXDoillOQcu1F1lQBxh4Akg2pLrUPGgDzSi1HwJSnyzQ9XrG4DkdHOfLraXXG/4Pe6Lap163WeUjjDas3HuylMlApZriTPQ92anVnTiJPQQJREctXFH5lC/t5z/3K5v0NaiM8Z0n1E2uMqnEc5fYCJ6yDiVmTrLDOH8JSDFeTVSFhrdS9akZexTcbXQRUkIyiJVdecYpMSGWb3Cd9cMKmLH65RXXRJWrTnGbjem8mR3xqLVZhWtvJvEIv4HF0b+69Nb1ISGCixJ7SxOAfwVIhxqhmCUyIHgyvUeiFHPbWmmU+39Diqw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t0QDF6J6SDoIImsAl0hZzYo+TisK4FvUtfsVcIQuysI=; b=N56goTmXAbQb1l+O3z+AyARVcgLlFCM02b1eXhS0Zxtc4r8/kCiVHWjIu0lAQnT01VlHDUXM48534aYLb68tvimuUxnYlVHzkR3ALau1UXCNBqMg4/HO8Dd1fx96Ath5AFzT14l7cIfMnowfVqEHbRyvTIWukxF8V8UOM2Op4OkkxOk2fAA0LQA6GPlhKUQv9yRVHndsb81OLPAVTP8MsQaEMyrUF9W1Er02bz1PQvfrT7/UauXE+6uR/l1MKIFV9GuN7pdivDRNDnmtdfQWAQaqTGQXGAM524aBCQw6a/omf9sxbn7J7zNm4sXWtHC2MIrpL/kkqCh10ZR05dAucA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mit.edu; dmarc=pass action=none header.from=mit.edu; dkim=pass header.d=mit.edu; arc=none
Received: from DM6PR01MB4444.prod.exchangelabs.com (2603:10b6:5:78::15) by MW4PR01MB6290.prod.exchangelabs.com (2603:10b6:303:70::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.14; Wed, 24 Aug 2022 16:32:14 +0000
Received: from DM6PR01MB4444.prod.exchangelabs.com ([fe80::9d75:790c:b376:ea0b]) by DM6PR01MB4444.prod.exchangelabs.com ([fe80::9d75:790c:b376:ea0b%5]) with mapi id 15.20.5566.015; Wed, 24 Aug 2022 16:32:13 +0000
From: Justin Richer <jricher@mit.edu>
To: Mark Nottingham <mnot@mnot.net>
CC: Tommy Pauly <tpauly@apple.com>, Poul-Henning Kamp <phk@phk.freebsd.dk>, Roberto Polli <robipolli@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Thread-Topic: A structured format for dates?
Thread-Index: AQHYgSScplG4jMWdXkid8X6nLK3dTq1ZtYMAgESbO4CAHErwAIAA6/SAgAEISgCAABTXAIAAFvUAgAAqGwCAAOZOgIAA37UA
Date: Wed, 24 Aug 2022 16:32:13 +0000
Message-ID: <3CBE12DF-8229-43E0-A9D9-EAB306B9EFF8@mit.edu>
References: <202208231056.27NAuWFY015133@critter.freebsd.dk> <7B9BFDFF-337E-4CB8-8550-3D38EFD52160@apple.com> <685890F9-9F68-41EF-AC8C-86ACAD074A38@mnot.net>
In-Reply-To: <685890F9-9F68-41EF-AC8C-86ACAD074A38@mnot.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mit.edu;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 10159f07-e01b-439b-5faa-08da85ee3371
x-ms-traffictypediagnostic: MW4PR01MB6290:EE_
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: vqGcA/46qOq1OPHXRmoXa05vHEQMF7m7ALJgQbgmQ+hMrvFnek2UGeiCvpLvaY69hs/21mNxiD9pJ8dxBkt/Pm8wPSRAPYgP2bnuyAEjyDZdsb/+0ropwICEUt2SeMLrn9D6rUs+NK6Mn/oERT3RJeHaAzMlgGN9lRkjGZlrSy2serkRbKodIF8jIf6Pz74mRUneoJT63e/oNVMTmfBHX/sVFp791hUOZcm/mERwWZazP3mpxKPy4rerQD4bso0yfVkaynX6b6FGDm9fctLKU7u+XNIIaKYhaKyXik1zEgPFJE7m7sBEBvp9sf0qAlF0LIsF1bjMubkqXaxE0o5BCi6KBoPebSAHtOScd9iytRqLy89UT2AJ5GJuTHUZwCkYrodYWBmPNeZVmIEeKhzL7uD7QkuUhscolm2h6fL7BmIXhIrfmUK/4S9W7XaA7r07UbS/LTKkeghmS3oXFW5gepenTZDlz0uOAIXHoy3z0t8xKLk02al11OxVVpmucu6HXr+VuoWRRVGO//gT4WlcWlCfJNYzvLJycUzLs23aTyAdWEka0F2oGk9ucLGHwG1pDhZiCNoBoSBRlZywfglPXczbufEt/eJwuINfDQb981Draz6eGZXDnyOT7ukxpZVq36mopflw6gDBplLQF0nn4nmqu6VNnROouxvqiaCB/OYCCasBQNuEy9KfohaalhMphoQvCj8chSupdgSLqzpeZR/T8y/42GICR6sg9+tPCmvLaez/9kbQYUprqUbatF/F6xAEVEyGFCn/NI1mMhQpYCLB9F7iNl7DhibRk5j06Do=
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB4444.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(136003)(366004)(346002)(39860400002)(376002)(2616005)(75432002)(186003)(38100700002)(86362001)(38070700005)(122000001)(66946007)(66476007)(66446008)(76116006)(64756008)(91956017)(41320700001)(66556008)(786003)(33656002)(316002)(36756003)(2906002)(4326008)(966005)(6916009)(5660300002)(8936002)(54906003)(6486002)(41300700001)(8676002)(478600001)(53546011)(6512007)(26005)(6506007)(71200400001);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: GTKOJhi+h3imLi7QfQsi3EX1mwz6J5s3PqRBEKPP7dUCnlhUOVorInK/o5mS3DWLS7gteulekIJM6qA6LJoFc8KxDUeOshNlH/yQlOpGSl/NWSy1Aw4lUSqyUevOReF1apddKvX3TXPaoomdkVemzHCe0PkLwuIEmEWJJUGjSLcJOf0Atw9VgdLTHDZuATWNhh61WPiXDsTziCmpJGK7TXfXMBjO8zGoAJ2fvhJsnphCrlbXP1eGOjMhI2LmHRpg3XRwAVHW0D6CYJ498BhjZ8CgTV+1GI1M35GRN9DR5gmzl3yNWLwtUQTKliaWIOqFZaR7CzNTKeKKBJTddYpN6zxhMltnl2/0Zbi5FNFZabIgsXsA+149po34iCuFgxFulnN6A+cm3yWXnaFKgYHBJsv+hp+hb2wz+ekTGJhgXsyln3LQy8KXQsh0UOaJ5oGTLiOoSG7XeZqCjlHXKOoQ+20GW0WPZ2iz6vGauHHsqcq47X3O6dbTs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9JOI010z
Content-Type: text/plain; charset="utf-8"
Content-ID: <5BB8C7F54B0BCF4CA7055A64B1BC4D8B@prod.exchangelabs.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB4444.prod.exchangelabs.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 10159f07-e01b-439b-5faa-08da85ee3371
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Aug 2022 16:32:13.7968 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 64afd9ba-0ecf-4acf-bc36-935f6235ba8b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: jcbvvvFjnjktYK6N9PkI6Wk30UzkNCsP/gw5+neKLX73pSWZgh7jmN6pe/Ui4i45
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR01MB6290
X-OriginatorOrg: mit.edu
X-W3C-Hub-DKIM-Status: validation passed: (address=jricher@mit.edu domain=mit.edu), signature is good
X-W3C-Hub-Spam-Status: No, score=-7.4
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_MED=-2.3, SPF_HELO_NONE=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: titan.w3.org 1oQtJB-00495p-6N 99397df9ad521dd64f25700b6adb6d2a
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/3CBE12DF-8229-43E0-A9D9-EAB306B9EFF8@mit.edu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40352
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>

+1 to Mark’s arguments, and this is why I’m also in favor of the textual serialization.

It feels like the calls for using an integer serialization are an optimization of something that would be better suited to another format, like binary fields.

For a similar strawman, things like lists and dictionaries could have had more compact serializations (no whitespace, length encoding, etc), but they are instead human-readable structures that are easy to visually parse. That’s what I’d want from a Date field type.

I think the previous PR cut the right balance between having a very precise underlying data model (it’s an integer from epoch) and a human-readable form (a strict serialization and parsing rule set), and kept open the door to the compact optimization that’s being argued for in this thread. I would personally rather we go with that model as opposed to tightly tying together the data model and serialization like is being suggested.

 — Justin

> On Aug 23, 2022, at 11:11 PM, Mark Nottingham <mnot@mnot.net> wrote:
> 
> 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/
> 
>