Skip to content

Define time zone values and conversions #1078

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions spec/functions/datetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,21 @@ the functions `:datetime`, `:date`, and `:time`.
(see [TZDB](https://www.iana.org/time-zones)
and [LDML](https://www.unicode.org/reports/tr35/tr35-dates.html#Time_Zone_Names)
for information on identifiers)
- `local`
- `input`
- `UTC`
> [!NOTE]
> The value `local` permits a _message_ to convert a date/time value
> into a [floating](https://www.w3.org/TR/timezone/#floating) time value
> (sometimes called a _plain_ or _local_ time value) by removing
> the association with a specific time zone.
The default value for `timeZone` is the default time zone provided by the _formatting context_.
The value `input` corresponds to the time zone of the _operand_.
If it is used and the _resolved value_ of the _operand_ does not include a time zone,
a _Bad Operand_ error is emitted and the default time zone is used to format the _expression_.
If the _resolved value_ of the _operand_ includes a time zone,
and the _resolved value_ of the `timeZone` _option_ is different from that,
an implementation SHOULD convert the _resolved value_ of the _operand_
to the time zone indicated by the _resolved value_ of the `timeZone` _option_.
If such conversion is not supported, an implementation MAY alternatively
emit a _Bad Option_ error and use a _fallback value_ as the _resolved value_ of the _expression_.
The following _option_ is REQUIRED to be available on
the functions `:datetime` and `:time`:
Expand Down