diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml index e9759c418..3119a808a 100644 --- a/specifications/xpath-functions-40/src/function-catalog.xml +++ b/specifications/xpath-functions-40/src/function-catalog.xml @@ -10698,10 +10698,15 @@ return ($value - unix-dateTime()) div seconds(0.001) - + - + + deterministic + context-dependent + focus-independent + + deterministic context-independent focus-independent @@ -10713,6 +10718,8 @@ return ($value - unix-dateTime()) div seconds(0.001)

This function uses a database of civil timezones (including daylight savings time) to return the timezone offset for a given date/time and place. For example, the timezone offset for New York on 31 December 2024 would be -PT5H.

+

If the $place argument is omitted or empty then the + from the dynamic context.

If the supplied $dateTime has no timezone then the implicit timezone from the dynamic context is used. This is unrelated to the timezone applicable to the requested $place.

The intended use of the $place argument is to identify @@ -10754,6 +10761,11 @@ represented by the $dateTime argument took place or will take place )

returns the current civil date and time in New York.

+ +

If the default place is a location in the same timezone as (say) Paris, then the expression

+ civil-timezone('2024-07-01T09:00:00') +

returns PT2H.

+

New in 4.0

diff --git a/specifications/xquery-40/src/expressions.xml b/specifications/xquery-40/src/expressions.xml index 458495f63..258ba8d2b 100644 --- a/specifications/xquery-40/src/expressions.xml +++ b/specifications/xquery-40/src/expressions.xml @@ -1559,12 +1559,15 @@ comparison or arithmetic operation. The implicit timezone is an Default place. This is a geographical location used to identify the place where events happened (or will happen) when - formatting dates and times using functions such as fn:format-date and fn:format-dateTime, + processing dates and times using functions such as fn:format-date, fn:format-dateTime, + and fn:civil-timezone, if no other place is specified. It is used when translating timezone offsets to civil timezone names, and when using calendars where the translation from ISO dates/times to a local representation is dependent on geographical location. Possible representations of this information are an ISO country code or an Olson timezone name, but implementations are free to use other representations from which the above - information can be derived. + information can be derived. The only requirement is that it should uniquely identify a civil timezone, + which means that country codes for countries with multiple timezones, such as the United States, + are inadequate.