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
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
+returns PT2H.
+New in 4.0
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.