Re: A structured format for dates?

Toerless Eckert <tte@cs.fau.de> Thu, 16 June 2022 17:04 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 97611C157B33 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 16 Jun 2022 10:04:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.661
X-Spam-Level:
X-Spam-Status: No, score=-2.661 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_BLOCKED=0.001, 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 PbHkce2t8vJf for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 16 Jun 2022 10:04:28 -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 347B8C14F74F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 16 Jun 2022 10:04:27 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1o1ssH-0000T5-3v for ietf-http-wg-dist@listhub.w3.org; Thu, 16 Jun 2022 17:01:41 +0000
Resent-Date: Thu, 16 Jun 2022 17:01:41 +0000
Resent-Message-Id: <E1o1ssH-0000T5-3v@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <eckert@i4.informatik.uni-erlangen.de>) id 1o1ssF-0000SC-DC for ietf-http-wg@listhub.w3.org; Thu, 16 Jun 2022 17:01:39 +0000
Received: from faui40.informatik.uni-erlangen.de ([131.188.34.40]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <eckert@i4.informatik.uni-erlangen.de>) id 1o1ssD-0000Zn-Hq for ietf-http-wg@w3.org; Thu, 16 Jun 2022 17:01:39 +0000
Received: from faui48e.informatik.uni-erlangen.de (faui48e.informatik.uni-erlangen.de [IPv6:2001:638:a000:4134::ffff:51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTPS id 0130B58C4AF; Thu, 16 Jun 2022 19:01:21 +0200 (CEST)
Received: by faui48e.informatik.uni-erlangen.de (Postfix, from userid 10463) id E2C1E4EB1CD; Thu, 16 Jun 2022 19:01:20 +0200 (CEST)
Date: Thu, 16 Jun 2022 19:01:20 +0200
From: Toerless Eckert <tte@cs.fau.de>
To: Willy Tarreau <w@1wt.eu>
Cc: Mark Nottingham <mnot@mnot.net>, Poul-Henning Kamp <phk@phk.freebsd.dk>, HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <Yqth4ETY0Q5i1CEc@faui48e.informatik.uni-erlangen.de>
References: <8C9C4A5C-45DB-43C0-9769-2A7510854AB1@mnot.net> <202206160546.25G5k0KR056033@critter.freebsd.dk> <B34DEE15-DE14-4DC2-B6D0-F0CD1823EC30@mnot.net> <20220616062211.GA28947@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20220616062211.GA28947@1wt.eu>
Received-SPF: pass client-ip=131.188.34.40; envelope-from=eckert@i4.informatik.uni-erlangen.de; helo=faui40.informatik.uni-erlangen.de
X-W3C-Hub-Spam-Status: No, score=-6.0
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1o1ssD-0000Zn-Hq 30318f7d309d5f89635fcdfdb86f8076
X-Original-To: ietf-http-wg@w3.org
Subject: Re: A structured format for dates?
Archived-At: <https://www.w3.org/mid/Yqth4ETY0Q5i1CEc@faui48e.informatik.uni-erlangen.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40128
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>

Added:

I like structured format. There are a lot of diagnostics and other software that would not want to do additional transcoding of header elements but just represent them verbatim as they occur. Those are helped if the verbatim representation is already easier readable.

I do not think TZ belongs into a time/date representation. Aka: all date/times in UTC please. TZ can be added somehow as a "location" information, ideally in a different header field. If it is in the same header field, it would be confusing to show the time in UTC but ALSO to indicate the TZ. Maybe this can be resolved by coming up that would make it as obvious as possible that the date/time is NOT adjusted for the TZ shown. Maybe not call it "TZ" but "LOC" so that the "the date/time it TZ adjusted" recognition is not triggered. And of course waste the three characters on "UTC" in the representation.

I do not believe the processing speed argument to be valid. The level of processing speed where just a (sub)second unstructured value would help goes IMHO into the space of CoAP, not HTTP. I'd first try to make HTTP better where it does not just duplicate CoAP efforts. All that binary stuff CoAP needs to do is severely making toolchains more complex IMHO.

I do like the leap-second argument.

I do think msec accuracy should be an option. RTTs within lan/metro environments can easily be in the single digit msec range and you want to be able to diagnose e.g.: REST based broker/bus-type transaction speeds, relative ordering of request/replies.

Cheers
    Toerless

On Thu, Jun 16, 2022 at 08:22:11AM +0200, Willy Tarreau wrote:
> 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

-- 
---
tte@cs.fau.de