Skip to content

Commit cb009b5

Browse files
authored
Define time zone values and conversions (#1078)
1 parent 1bcc219 commit cb009b5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

spec/functions/datetime.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,21 @@ the functions `:datetime`, `:date`, and `:time`.
260260
(see [TZDB](https://www.iana.org/time-zones)
261261
and [LDML](https://www.unicode.org/reports/tr35/tr35-dates.html#Time_Zone_Names)
262262
for information on identifiers)
263-
- `local`
263+
- `input`
264264
- `UTC`
265265
266-
> [!NOTE]
267-
> The value `local` permits a _message_ to convert a date/time value
268-
> into a [floating](https://www.w3.org/TR/timezone/#floating) time value
269-
> (sometimes called a _plain_ or _local_ time value) by removing
270-
> the association with a specific time zone.
266+
The default value for `timeZone` is the default time zone provided by the _formatting context_.
267+
268+
The value `input` corresponds to the time zone of the _operand_.
269+
If it is used and the _resolved value_ of the _operand_ does not include a time zone or offset,
270+
a _Bad Operand_ error is emitted and the default time zone is used to format the _expression_.
271+
272+
If the _resolved value_ of the _operand_ includes a time zone or offset,
273+
and the _resolved value_ of the `timeZone` _option_ is different from that,
274+
an implementation SHOULD convert the _resolved value_ of the _operand_
275+
to the time zone indicated by the _resolved value_ of the `timeZone` _option_.
276+
If such conversion is not supported, an implementation MAY alternatively
277+
emit a _Bad Option_ error and use a _fallback value_ as the _resolved value_ of the _expression_.
271278
272279
The following _option_ is REQUIRED to be available on
273280
the functions `:datetime` and `:time`:

0 commit comments

Comments
 (0)