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

Ujjwal Sharma <ryzokuken@igalia.com> Mon, 08 November 2021 08:05 UTC

Return-Path: <ryzokuken@igalia.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 975A53A0814 for <sedate@ietfa.amsl.com>; Mon, 8 Nov 2021 00:05:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.05
X-Spam-Level:
X-Spam-Status: No, score=-1.05 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=igalia.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 5Za9qsBF7Zlx for <sedate@ietfa.amsl.com>; Mon, 8 Nov 2021 00:05:40 -0800 (PST)
Received: from fanzine.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 7E6CB3A0819 for <sedate@ietf.org>; Mon, 8 Nov 2021 00:05:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Cc:To:Subject:From:Date; bh=un5+NtSyfD/JiTLGuIxm0aDSyGorLwaJG1dBSAQMk5c=; b=Ob72EQJ3uuK4ejPToCWAbzBzl9x4ctyGMx0xAfyuGDFlLCa5xqIThXRt/4/q0/vAlztqYDPZkO3vDV0JmTCXXXaeKXXtj1YDVhqqmuy49CxAvpGEsJyEqtZMMXQM6jGeKIPALH/zG1DYZyPcBMOKDnjFLdDO11BRMmpwsXohhHme7qNxqUWMTCetYAFVImPaHN3GZzQuTEy9u4blXzKnBpt28MF6yek2o67jf9nHAXnXfpBYhYltrjSOiUCcsJU4F74gxEnB0QoekOQ58qghKzSFzo3Y/DpQqe3IAtYe+c7iYQmyCz1SloSIf1gJ9R4ZpAa3tdmTyQ5BYyWWJzlQCg==;
Received: from [183.83.212.58] (helo=[192.168.0.191]) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1mjzf7-0005Qp-EA; Mon, 08 Nov 2021 09:05:53 +0100
Date: Mon, 08 Nov 2021 01:33:01 +0530
From: Ujjwal Sharma <ryzokuken@igalia.com>
To: Bron Gondwana <brong@fastmailteam.com>
Cc: sedate@ietf.org, temporal-champions@chromium.org
Message-Id: <11X72R.SN4P5VPIQTJ61@igalia.com>
In-Reply-To: <dd7c1028-09bc-4839-b6d4-68e14e99b349@dogfood.fastmail.com>
References: <dd7c1028-09bc-4839-b6d4-68e14e99b349@dogfood.fastmail.com>
X-Mailer: geary/40.0
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Archived-At: <https://mailarchive.ietf.org/arch/msg/sedate/EiegbzVNok4QBLHcFZ8WAeGvbDg>
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 08:05:46 -0000

CCing Temporal champions mailing list for greater visibility

On Sun, Nov 7 2021 at 14:16:13 +1100, Bron Gondwana 
<brong@fastmailteam.com> wrote:
> One of the biggest areas of debate in the meetings so far has been 
> how to handle a mismatch between the zone and the offset, and whether 
> to allow floating times.
> 
> I've had an idea in my head for a bit, so I figured I should write it 
> out in advance of our meeting next week!
> 
> The basic principles are:
> the special name 'floating' is used to specify that the timezone will 
> be resolved at the point of display or use
> the zone in brackets is advisory only, the offset always wins
> the namespace 'tz' specifies a timezone which overrides the offset.  
> That means that a time with a 'tz' namespace may be different than 
> timestamp defined purely by the RFC3339 part, thought it's recomended 
> to use the best-guess at what the offset is likely to be in the 
> timestamp, so that systems which don't understand this extension 
> still give as good position as possible.
> 
> My example timepoint will be 9am on my birthday - not this year, but 
> next year - giving enough time for some likely changes to happen.  So 
> that's
> 
> 2022-11-26T09:00:00
> 
> I expect that I'll probably be at home when I create this, so by 
> default I would create one of these:
> 
> 2022-11-26T09:00:00+11:00
> 2022-11-26T09:00:00+11:00[Australia/Melbourne]
> 
> These both mean 2022-11-25T22:00:00Z and always will, no matter when 
> they are resolved.
> 
> Changes to zone offsets
> 
> Let's suppose the the Victorian government decided to join with 
> Queensland and stop doing daylight saving next year, so 
> "Australia/Melbourne" would then resolve to +10 in late November.  I 
> could use this syntax:
> 
> 2022-11-26T09:00:00+11:00[tz=Australia/Melbourne]
> 
> Which would start out as 2022-11-25T22:00:00Z still, but would change 
> to 2022-11-25T23:00:00Z once the local zone database was updated.
> 
> 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]
> 
> (I'm happy bikeshed alternative syntax, e.g. [tz-floating=true] - 
> just a clear way to specify this concept.  An advantage of having 
> 'tz=' for both is that the "closest bound wins" rule applies - and 
> you don't get confusion if both floating and a named timezone are 
> specified on the same item - the first one always wins)
> 
> So if I'm still in Melbourne for my birthday next year, then it's the 
> same as one of the above examples, but if I went to IETF115 in Madrid 
> (assuming we go there for November next year!) and wound up still in 
> Europe for a few weeks after, then it might resolve to 
> 2022-11-26T08:00:00Z for me, because I'd only be one hour ahead of 
> UTC.
> 
> While we're at it, what about TAI?
> 
> Maybe I care about the alignment of the heavens at exactly 9am on my 
> birthday being exactly 31536000 seconds since 9am Melbourne time on 
> my birthday this year!  Maybe I could write:
> 
> 2022-11-26T09:00:00+11:00[tz-tai=37]
> 
> Where 'tz-tai=N' defines the integer TAI offset that was expected to 
> apply at the time.
> 
> Then if a leap second gets added or removed at the end of this year, 
> this could resolve to a UTC date of:
> 
> 2022-11-25T21:59:59Z or 2022-11-25T22:00:01Z
> 
> (either way, it's the same TAI date of 2022-11-25T21:59:23, 
> regardless of leapseconds)
> 
> Obviously - these could all be stacked and the rules would be very 
> clear about what to do, though it would be pretty weird to care about 
> the exact TAI offset but NOT the exact UTC offset.
> 
> ...
> 
> I think this is all consistent and easily implementable.
> 
> In particular, it creates clarity around handling:
> If you specify an unadorned timezone, then the timezone is advisory 
> and the offset always wins.
> If you specify anything with the 'tz' namespace, then the offset is 
> advisory and the timezone information overrides at the point when the 
> date is resolved.
> If the timezone can't be resolved, then the offset can be used as a 
> fallback - so implementations SHOULD use their best guess as to the 
> offset that is likely to be meaningful (e.g. local timezone of the 
> user or system that created the date)
> 
> Regards,
> 
> Bron.
> 
> --
>   Bron Gondwana, CEO, Fastmail Pty Ltd
>   brong@fastmailteam.com
> 
>