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

Bron Gondwana <brong@fastmailteam.com> Mon, 08 November 2021 04:24 UTC

Return-Path: <brong@fastmailteam.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 E72A43A03F3 for <sedate@ietfa.amsl.com>; Sun, 7 Nov 2021 20:24:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-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=fastmailteam.com header.b=UI0036YC; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=Qce/kqLc
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 jjT7z2J2phw3 for <sedate@ietfa.amsl.com>; Sun, 7 Nov 2021 20:24:16 -0800 (PST)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B3B5C3A03EE for <sedate@ietf.org>; Sun, 7 Nov 2021 20:24:16 -0800 (PST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 02DB95C00A5 for <sedate@ietf.org>; Sun, 7 Nov 2021 23:24:15 -0500 (EST)
Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Sun, 07 Nov 2021 23:24:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type; s=fm1; bh=3J/cTJH AWmqCO+r0j4ahkVjNqywmunLc9VoMXKkdMEQ=; b=UI0036YCqn2cmZ8zLNi73n1 2W2qzUHCaoT+rGcAfUsvejmPLQHAx0wx3VVy8etuhbXU/sU4bcyI4S3v9hJl7HTV FA15JYX/kiA3dXSokSQMwchH5q2BsT9Z6Nv8vAJ6g0UntgpoY1ZePopwqLB/WlFa p7DNf/yo5rRaK56SNSeWjtDS+OGAj90X6qwly4861B6pRUNU38TRJWvFA4n1s+9l wcVeb1w4xIe68iRHp/0+7T+QPP+CTb1M81k+cSXLmrWVDy9ZvgBREcyf2tqU1lCO 00iMD0ejziCHyE9IPKnuEAAw9yIyOnkbZ5rfs6q1rFaQbawZcUCm3oSkfcHV8cw= =
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=3J/cTJ HAWmqCO+r0j4ahkVjNqywmunLc9VoMXKkdMEQ=; b=Qce/kqLcOZXSw239STbtPc U6hTewAxNjXbJfKeXc2Lsay2bNB11+TTeQ56ZML7NjP2fGeXOWE8QUOYgs3RhKC6 AVOFVBJN0kMjUZ3Ybz0Ij19FjMupQGdX9OiwL/t9QL2DB2brj2i+QACFoF8WROT6 7RZRukaUJ1w+Rv1TjoZW9VXX9bZc9gb6kOPpPo34UrGvO4ScTZe36aPWr89/qa+z 6kdWRNXtvdNvkzNyCpDZrcPUr+6IgKIo6IPnH2HlF0NT2lhdyJJP9JKWh7qRqGz6 C8hZPlZkpgAZooJ7YgPNu4rkn74sqGxbAIHWndZxYFkSaJ1Ge8KTcZyeiSy369fg ==
X-ME-Sender: <xms:baaIYWiENPWjfR16IOg3_20TwSnOV1Say1jMShDqTvyaBMMs90l-OA> <xme:baaIYXDsJx5CF37kAaYAQOmjgg3V13cNGWUuYVEOsnY6AeypvZ_sPis6Nu2b1Resg sl1Ois6bR0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddugdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtre erreertdenucfhrhhomhepfdeurhhonhcuifhonhgufigrnhgrfdcuoegsrhhonhhgsehf rghsthhmrghilhhtvggrmhdrtghomheqnecuggftrfgrthhtvghrnhepvdduueeihefgvd ehueeujeejuedugfeigfevteefleetfeffgfdtjeejgfeuuddvnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsghrohhnghesfhgrshhtmhgrih hlthgvrghmrdgtohhm
X-ME-Proxy: <xmx:baaIYeGjDMR814xwz51qxHwbVpMWBxMZ1JL8kqm8yk0eM2WH5kZgpg> <xmx:baaIYfRY7Ur07yVW17Ilu7qRZi-KOFbQuSUXAgIjbS9FPi98e5Pleg> <xmx:baaIYTzcLfpqSfJ2cnRl74pKjSC-nu7VDiTsfC_nHM6XQbz3VFtZRA> <xmx:bqaIYS8UWoFjSoqRItikN168oKGU4AafzXP7bLwGBJT4gL9c-fv45A>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9F9FCAC0DD1; Sun, 7 Nov 2021 23:24:13 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-1420-gdf09e8761c-fm-20211101.001-gdf09e876
Mime-Version: 1.0
Message-Id: <088a5135-1a39-4135-b8d7-e61113e3c143@beta.fastmail.com>
In-Reply-To: <c0dbaa85-5e5e-409d-a613-9302e9103283@dogfood.fastmail.com>
References: <dd7c1028-09bc-4839-b6d4-68e14e99b349@dogfood.fastmail.com> <c0dbaa85-5e5e-409d-a613-9302e9103283@dogfood.fastmail.com>
Date: Mon, 08 Nov 2021 15:23:52 +1100
From: Bron Gondwana <brong@fastmailteam.com>
To: sedate@ietf.org
Content-Type: multipart/alternative; boundary="cae36d5dd073451e83a982c6905bf4cb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/sedate/bnDt7mspZQ-x7M2j0-6WNwxQOok>
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 04:24:22 -0000


On Mon, Nov 8, 2021, at 15:11, Neil Jenkins wrote:
> On Sun, 7 Nov 2021, at 14:16, Bron Gondwana wrote:
>> *Floating time*
>> **
>> Suppose I just wanted to know when 9am was on my birthday, wherever I am in the world.  I would use something like:
>> 
>> `2022-11-26T09:00:00+11:00[tz=floating]`
> 
> This is not floating time. You've given it an offset: +11h. I don't understand this proposal at all. We already have a perfectly good syntax for a floating (a.k.a. wall-clock) date-time, in fact you used it earlier:
> 
> `2022-11-26T09:00:00`

Yes, but... the problem is that this is NOT an RFC3339 plus an extension, it's a subset of RFC3339.  So by putting the offset and the extension to say "adjust the offset to the current timezone", you get a treatment of floating which is basically "local time but we don't know the location/timezone yet".

Just like with the "localtime, zone overrides offset" version, there's still an offset hint.  This is different to ICALENDAR times, because this format currently always requires an exact timepoint in RFC3339 syntax, even if that timepoint might be adjusted if the offset no longer matches the zone once the zone is resolved.

> It's the one that everyone already intuitively uses for this. The only thing that's needed is to give it a name so it can be more easily referenced from other documents.

Ok... only, 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.  You can always do:

`2022-11-26T09:00:00Z[tz=floating]`

Which has identical meaning to the +11:00 example I gave above, except that if you don't know which zone to float into, it defaults to UTC - which is what at least Cyrus IMAPd does when it gets a floating time and has no timezone context (and the early bugs we had with alarms at the wrong time were precisely that - because there was no zone information in the alarm daemon until we figured out how to pass it down from the calendar default)

So you can reliably convert from this format into ICALENDAR's offsetless floating time, and reliably convert back by using 'Z' and [tz=floating].

Bron.

--
  Bron Gondwana, CEO, Fastmail Pty Ltd
  brong@fastmailteam.com