Re: A structured format for dates?

Willy Tarreau <w@1wt.eu> Thu, 16 June 2022 06:25 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 5DE3BC15AAE1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 15 Jun 2022 23:25:23 -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 CcRR9dZoCvkW for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 15 Jun 2022 23:25:19 -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 90F0DC15AAE0 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 15 Jun 2022 23:25:18 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1o1iti-0001bp-Bo for ietf-http-wg-dist@listhub.w3.org; Thu, 16 Jun 2022 06:22:30 +0000
Resent-Date: Thu, 16 Jun 2022 06:22:30 +0000
Resent-Message-Id: <E1o1iti-0001bp-Bo@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <w@1wt.eu>) id 1o1itg-0001aV-8L for ietf-http-wg@listhub.w3.org; Thu, 16 Jun 2022 06:22:28 +0000
Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by titan.w3.org with esmtp (Exim 4.92) (envelope-from <w@1wt.eu>) id 1o1ite-0000dz-PF for ietf-http-wg@w3.org; Thu, 16 Jun 2022 06:22:28 +0000
Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 25G6MBiu028953; Thu, 16 Jun 2022 08:22:11 +0200
Date: Thu, 16 Jun 2022 08:22:11 +0200
From: Willy Tarreau <w@1wt.eu>
To: Mark Nottingham <mnot@mnot.net>
Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <20220616062211.GA28947@1wt.eu>
References: <8C9C4A5C-45DB-43C0-9769-2A7510854AB1@mnot.net> <202206160546.25G5k0KR056033@critter.freebsd.dk> <B34DEE15-DE14-4DC2-B6D0-F0CD1823EC30@mnot.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <B34DEE15-DE14-4DC2-B6D0-F0CD1823EC30@mnot.net>
User-Agent: Mutt/1.10.1 (2018-07-13)
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
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: titan.w3.org 1o1ite-0000dz-PF 47e1fde01dd1bd16a78d1b4851c78254
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/20220616062211.GA28947@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40115
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 Thu, Jun 16, 2022 at 04:04:52PM +1000, Mark Nottingham wrote:
> Personally, I tend to agree with PHK - I think that Integer (or Decimal) is
> adquate and appropriate.

+1 for me!

> However, some people seem to keep on pushing back on this - I think
> especially for application-focused headers it's more visible. If we're going
> to do something, retrofit is a good opportunity for it, since we're defining
> SF-Date and friends.

The thing is, the effort to present *any* human-readable string is always
worse than converting an integer (or decimal) to the final representation,
since it's required to pass through such an integer-based representation
at one point during the operation anyway.

The epoch-based representation also has the benefit that you're not required
to have to guess a timezone nor to be confused by ":60" resulting from a leap
second once every few years.

Also, applications that want to rely on text-based dates do not all agree
on the format. Some would like to see the day-of-week there, others don't
want ISO8601 because it's less readable by humans etc. Thus I'd rather go
for integer+fraction only.

Cheers,
Willy