Loading TOC...

MarkLogic 12 EA 2 Product Documentation
fn.timezoneFromDateTime

fn.timezoneFromDateTime(
   arg as 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 dateTime whose timezone component will be returned.

Example

fn.timezoneFromDateTime(
    xs.dateTime("1999-05-31T13:20:00-05:00"));
=> the xs.dayTimeDuration whose value is -PT5H

Example

fn.timezoneFromDateTime(
    xs.dateTime("2000-06-12T13:20:00Z"));
=> the xs.dayTimeDuration whose value is PT0S

Example

fn.timezoneFromDateTime(
    xs.dateTime("2004-08-27T00:00:00"));
=> ()

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.