Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow RFC 9557 time zone information #1034

Open
jaskij opened this issue Jul 25, 2024 · 1 comment
Open

Allow RFC 9557 time zone information #1034

jaskij opened this issue Jul 25, 2024 · 1 comment

Comments

@jaskij
Copy link

jaskij commented Jul 25, 2024

There is an update to RFC 3339, 9557. It allows not only for flat offsets, but also for specifying timezone information.

This should be added as an allowed timestamp format in the TOML spec.

@arp242
Copy link
Contributor

arp242 commented Aug 1, 2024

Static UTC offsets really aren't enough for lots of use cases due to DST and other timezone changes. In a lot of cases you really want to be storing "date + location", rather than "date + offset". So obviously all of this is useful.

That said, one of the downsides of adding this is that TOML will now rely on a timezone info database. A related issue is one of updates: "Europe/Narnia" could be created tomorrow; or the definition of a timezone can change. Often it will introduce an extra dependency in some form or the other that every TOML implementation and application using TOML will now need.

In addition, in the context of TOML, I think you probably don't need it that often. By and large, people aren't storing meeting times or user timezone preferences in TOML files. The entire datetime feature in general probably isn't very often used.

So on balance, I think it's probably best to leave time up to applications, because the downsides outweigh the upsides. For example as:

t = [2020-01-02 15:16:17, 'Europe/Dublin']

Or even just as a string:

t = '2020-01-02 15:16:17[Europe/Dublin]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants