timezone-from-date

The timezone portion of a date

Description

The fn:timezone-from-date function returns the time zone of an xs:date value, offset from UTC, as an xs:dayTimeDuration value between -PT14H and PT14H. If the time zone is UTC, the value PT0H is returned.

Parameters

Description

arg:date()

Examples

XPath

Results

Explanation

timezone-from-date(xs:date(‘2006-08-15-05:00’))

-PT5H

timezone-from-date(xs:date(‘2006-08-15’))

()

regardless of the implicit time zone

See Also