A new standard format to represent date times including time zone 
information is coming. Just a quick post to raise awareness and help 
prepare if we wish to support this:)

*Issue with ISO 8601:*
ISO 8601 only allows passing the offset, losing daylight saving time 
information. Additional information may be added, such as the calendar 
system.

*Example RFC 9557 string:*
1996-12-19T16:39:57-08:00[America/Los_Angeles]

Valid RFC 3339 strings (e.g., 1996-12-19T16:39:57-08:00) are also valid RFC 
9557 strings.

*Inconsistencies:*
1.   2022-07-08T00:14:07+01:00[Europe/Paris]
Europe/Paris used a time zone offset of +2 in July 2022, not +1.

2.   2022-07-08T00:14:07+01:00[!Europe/Paris]
Same timestamp text but using the critical flag, indicating applications 
must act on the inconsistency.

3.   2022-07-08T00:14:07Z[Europe/Paris]
In combination with a time zone identifier, Z indicates an unknown local 
offset and local time. Therefore the timestamp text above is NOT 
inconsistent. The time is n UTC and is known, the time zone is 
Europe/Paris, but we do not know the local time and offset in Europe/Paris 
for this instant.

*Source:*
https://www.rfc-editor.org/rfc/rfc9557.html

I can see us adding a new `to_rfc9557` function in DateTime and a new 
`parse_datetime` function in Calendar.ISO accepting timestamps including 
the time zone identifier, which queries the time zone database for non-UTC 
timestamp formats.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/649e92e9-dbc5-4ad9-bfe7-8dcb9df01fd1n%40googlegroups.com.

Reply via email to