MarkLogic 12 EA 1 Product Documentation
fn:timezone-from-date

fn:timezone-from-date(
   $arg as xs:date?
) as xs:dayTimeDuration?

Summary

Returns the timezone component of $arg if any. If $arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.

If $arg is the empty sequence, returns the empty sequence.

Parameters
arg The date whose timezone component will be returned.

Example

fn:timezone-from-date(xs:date("1999-05-31-05:00"))
=> the xs:dayTimeDuration whose value is -PT5H

Example

fn:timezone-from-date(xs:date("2000-06-12Z"))
=> the xs:dayTimeDuration with value PT0H
Powered by MarkLogic Server | Terms of Use | Privacy Policy