Re: [Sedate] A syntax proposal: floating and future times

Justin Grant <justingrant.ietf.public@gmail.com> Mon, 08 November 2021 10:38 UTC

Return-Path: <justingrant.ietf.public@gmail.com>
X-Original-To: sedate@ietfa.amsl.com
Delivered-To: sedate@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 12A873A0867 for <sedate@ietfa.amsl.com>; Mon, 8 Nov 2021 02:38:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NBLLi4QcRZip for <sedate@ietfa.amsl.com>; Mon, 8 Nov 2021 02:38:17 -0800 (PST)
Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8DF433A081F for <sedate@ietf.org>; Mon, 8 Nov 2021 02:38:17 -0800 (PST)
Received: by mail-yb1-xb2b.google.com with SMTP id y3so42271006ybf.2 for <sedate@ietf.org>; Mon, 08 Nov 2021 02:38:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o2XU+IMZ+rXUIQ6E14UycSrpW1YbSPzDeKltIzjVtD8=; b=qUzp5kSn9IScwWfEkvoe4swTvglXYXovbzeKvOrpxQ+PuZrYTATxLUAxEV4yaMrsJV rbt+/LNdfdhc3h7XwJPkJ2jIzlMhVX9vQrJGgdT0txgo89UGKZGpGZNWO7b45tugkyci I29UliuDcAJuKvxa/IV41Bw2wghdvQQHQWNHTE9Zhup7eeerFJ/Ihdp05HpnGtUtTLEN b6hjnQZlxxQAuTNisniCJtSakvToYV6d1z/03MuRJbccBr7aTkxS2C/QXHkk8DRhhkZ+ 2EUfPV0Ajq0NkS4HrzjnoAMfS2WWNCbtp8v46N66ywUqHvzCM2tMmEpwjuAlPRaVQOE9 uqKg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o2XU+IMZ+rXUIQ6E14UycSrpW1YbSPzDeKltIzjVtD8=; b=A2ptm11OC/0sHhx+lvoCo6r6gOQm23BNEkwqz/cq4ShmnpGaSSjtwHw/4/feAu999q 4KGZrUMCWcrZfUGLcsG2ZqvHktue4ehMsp/10vBm2/K45+qLTsu7QBLrpQ0FeeIQk8jp bwTMTyQ1va06wq0Qa5h87cBg/KRzT91c1971+RAZ0ysmaCkNLk9AliMObqQECJBsVqlc 4kqMYjtK/5yVojS/eS58MgTQk7aEtQg7SSSraE6CApi2I6ZCUkqUg87xDVrlPTuPYuW6 i0Hbcyh8WQh61ketkd1iLnPXpsnp4OJpUhhJtOT+FKvnAaZGOjfCouleqPSs0jlCaWA6 Ok4A==
X-Gm-Message-State: AOAM531F7I7UqLVfSNSbrryPfNAn24BSzx5b8aKEUg0ypDL4JZ/Jrey6 ioqeHn6eyBHLc1gQD5NWxkG5ZQIYBuMHyuH/BsQfOZxtKm4=
X-Google-Smtp-Source: ABdhPJxsG7n2fw6eXyKk/KJkQYHGRtmACteQN0yR443ZKY9CgMLiKqqeZ7YMxsVMbA7uR5RH1iZl6+JQB1pUG5VQMws=
X-Received: by 2002:a25:d114:: with SMTP id i20mr78636327ybg.323.1636367894973; Mon, 08 Nov 2021 02:38:14 -0800 (PST)
MIME-Version: 1.0
References: <dd7c1028-09bc-4839-b6d4-68e14e99b349@dogfood.fastmail.com> <c0dbaa85-5e5e-409d-a613-9302e9103283@dogfood.fastmail.com> <088a5135-1a39-4135-b8d7-e61113e3c143@beta.fastmail.com> <8964ee5c-463e-44cd-a2b4-e1e1a419337b@dogfood.fastmail.com> <CACy7CfgD+P9GZHy2HG=dSYubJyutX_7YnnW-gj=4FXbV1n4Anw@mail.gmail.com> <67cbf820-a116-4c6b-aa2d-539174668021@dogfood.fastmail.com>
In-Reply-To: <67cbf820-a116-4c6b-aa2d-539174668021@dogfood.fastmail.com>
From: Justin Grant <justingrant.ietf.public@gmail.com>
Date: Mon, 08 Nov 2021 02:38:03 -0800
Message-ID: <CACy7CfjCCTVM9Dbu6EDJ_2kZbNkAge0kRYosmJ0Tv_dB7Hq7-w@mail.gmail.com>
To: Bron Gondwana <brong@fastmailteam.com>
Cc: sedate@ietf.org
Content-Type: multipart/alternative; boundary="0000000000001a10e705d0449722"
Archived-At: <https://mailarchive.ietf.org/arch/msg/sedate/SRTf9Q7QPdOtJYOpByt5S1JfMQ4>
Subject: Re: [Sedate] A syntax proposal: floating and future times
X-BeenThere: sedate@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Serialising Extended Data About Times and Events <sedate.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sedate>, <mailto:sedate-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sedate/>
List-Post: <mailto:sedate@ietf.org>
List-Help: <mailto:sedate-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sedate>, <mailto:sedate-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Nov 2021 10:38:22 -0000

What I'm hearing from Bron (which I agree with) is that there should be a
standardized syntax for floating times like "10:00AM on 20 January 2025 in
Melbourne".  This is how calendaring apps will store future meetings. We
can bikeshed on specific syntax, but the high order bit is that this use
case is very important for interchange.

But there's also what Neil and Carsten are saying, which is that floating
times are "not timestamps", meaning they're not interchangeable with a
single number indicating time since eopch. This is also correct, and
forcing all timestamp-reading software to also know about floating times
seems bad. So I can understand why other IETF folks may be concerned about
backwards compat and would want the new RFC to be a strict superset of
RFC3339 syntax in order to make it easier to port software to the new RFC.

I'd suggest that one way to achieve both camps' goals might be to split the
RFC text into two buckets (I'm assuming sections in the same document):

*1. Timestamps + annotations*.

   - Superset of RFC 3339; 100% backwards-compatible syntax and semantics
   if the annotations are stripped off.  Interchangeable with a single numeric
   since-epoch value. For backwards-compat reasons, Z or numeric offset is
   always required in the string.
   - Timezones and other extension syntax is specified here.
   - Includes a decision about how to treat conflicts between timezone and
   (non-Z) offsets if both are present.  Choices include: always reject;
   always keep the instant unchanged; always keep local time unchanged; or "by
   mutual agreement of the communicating parties" because desired behavior
   varies by use case.

*2. Subsets of "timestamps + annotations".*  Like ISO 8601 defines subsets
of its syntax for different use cases, so can we. "10:00AM on 20 January
2025 in Melbourne" represents most calendar meetings in the world and is a
subset with every field except offset. We can bikeshed on the string syntax
for this subset, as long as it's *not* RFC 3339 because that will bring up
those backwards-compat concerns noted above.  This section could be
extended further in a later revision with more subsets, e.g. Time + Time
Zone ("9:00AM in Berlin").

I'm not suggesting different content, only a slightly different way to talk
about the same work that might be less concerning to folks whose top
priority is backwards compat. and/or precision around what is and is not a
timestamp.

Cheers,
Justin


On Mon, Nov 8, 2021 at 1:06 AM Bron Gondwana <brong@fastmailteam.com> wrote:

> On Mon, Nov 8, 2021, at 18:40, Justin Grant wrote:
>
> *Changes to zone offsets*
>
>
> My understanding is that there's three use cases:
> 1. The sender wants to keep the instant fixed, even if the offset of the
> time zone has changed (this may result in a different local time than what
> was originally captured)
> 2. The sender wants to keep the local time fixed, even if the offset of
> the time zone has changed (this may result in a different instant than what
> was originally captured)
> 3. The sender has no opinion. It will send both the offset and the time
> zone to the receiver, and it wants the receiver to decide what to do if the
> offset of the time zone has changed.
>
> Here's how Temporal is currently (modulo whatever we decide here in
> SEDATE!) planning to handle these three cases:
> 1. Keep instant fixed by specifying a Z offset with a time zone
> annotation, e.g. 2022-11-26T09:00:00Z[Australia/Melbourne]
>
>
> I hate it - it's very human-unfriendly.  Either the Z means something
> different here (ick) or you just specified a time 11 hours after the time I
> specified in my example.
>
> 2. Keep local time fixed by omitting the offset from the string, e.g.
> 2022-11-26T20:00:00[Australia/Melbourne]
>
>
> Oh - you specified all of them 11 hours later.  My examples were all 9am
> in my time, but you've gone for 8pm in my time.
>
> This looks great except for one knotty problem - it's not an RFC3339
> production.  Which is why my proposal, which keeps the RFC3339, and it very
> clear.
>
> 3. Send both local time and offset, and leave it up to the receiver to
> decide what to do, e.g. 2022-11-26T20:00:00+11:00[Australia/Melbourne]
>
>
> This is the one that I specified as "offset wins".  There was a fair bit
> of interest, in the working group, in having the behaviour always well
> specified and not having "implementation defined" be a choice.
>
> What do folks think about those three syntaxes?
>
> For case (2), I'm not sure why we'd need a separate [tz=] syntax for this
> case, but maybe I'm missing something?
>
>
> Not if you're allowed to trim the offset away from an RFC3339 date, no.
> The 'tz' was there as a signifier of "the creator wants you to recalculate
> the offset before use.
>
> 2022-11-26T09:00:00Z[tz=floating]
>
>
> I admit I don't fully understand the use case for this syntax. If you know
> the instant but not the time zone, then why isn't  2022-11-26T09:00:00Z sufficient?
> If you know the local time but not the instant, then why isn't
> 2022-11-26T09:00:00 sufficient? If the only point of [tz=floating] is to
> notify the receiver that you don't know the time zone, then why not just
> omit the time zone annotation completely?
>
>
> There are two reasons to use this over 2022-11-26T09:00:00
>
> 1) so we keep the RFC3339 part intact.  I'm harping on about this because
> it's the entire point of my proposal.  Without that, the tz stuff is
> overkill.
> 2) it allows hinting of zone.  Hinting is optional of course, you could
> always use Z plus floating.  I don't know if explaining it out loud will
> help here.  I'll do up some nice slides anyway to see if I can make it
> clear.
>
> (speaking of which - during the session I'll need to take my chair hat off
> to do this, so I'm glad I have Mark there to help)
>
> It strikes me then that the fundamental problem here is that the goal is
> really to create a standardised serialisation of some date formats *that
> are not datestamps*, that are commonly used across applications on the
> web. It should use the same elements of syntax as RFC3339 but it's not
> exactly an "extension". All the problems seem to stem from trying to
> enforce that they can also be treated as single points in time.
>
>
> Yep, I'm inclined to agree with Neil here. When sending a partial zoned
> timestamp (e.g. I don't know the offset, or I know the timezone), I think
> the most obvious way to express "I don't know X" is to omit "X" from the
> string. I'm not sure it's a good idea to create a new syntax that pretends
> that it's an RFC3339-compliant timestamp when it's really not.
>
> when this was proposed at the last IETF, there was fairly strong pushback
> to the idea of the first part not being exactly an RFC3339 production - so
> I'm proposing a format which always contains an RFC3339 component and yet
> is reliably convertable.
>
>
> Do we know why there was such strong pushback?  What were the underlying
> concerns?
>
> I don't know the people involved so can't be sure, but I'd guess that
> adhering to RFC3339 syntax but not actually providing a meaningful
> timestamp would generate *more* pushback. But that's just a guess.
>
>
> I guess we'll see :)  I'm not really attached to my idea or anything, but
> it's the proposal that was bouncing around in my head to satisfy the
> requirement for an RFC3339 basis.
>
> Cheers,
>
> Bron.
> --
>   Bron Gondwana, CEO, Fastmail Pty Ltd
>   brong@fastmailteam.com
>
>
> --
> Sedate mailing list
> Sedate@ietf.org
> https://www.ietf.org/mailman/listinfo/sedate
>