.. _functx_timezone-from-duration: ============================= functx:timezone-from-duration ============================= Converts an xs:dayTimeDuration into a timezone like "-05:00" or "Z" Description ~~~~~~~~~~~ The functx:timezone-from-duration function accepts an xs:dayTimeDuration and converts it to a timezone value (formatted as it appears in xs:date, xs:time, xs:dateTime etc. values). The dayTimeDuration may only have the hours (H) component (or the seconds component if the value is PT0S) and must be between -PT14H and PT14H inclusive. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - duration:string() - the duration Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:timezone-from-duration(xs:dayTimeDuration('PT0S')) - Z * - functx:timezone-from-duration(xs:dayTimeDuration('-PT5H')) - -05:00 * - functx:timezone-from-duration(xs:dayTimeDuration('PT9H')) - +09:00 See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_duration-from-timezone`. * :ref:`timezone-from-time`. * :ref:`timezone-from-dateTime`.