# fn:adjust-dateTime-to-timezone - XPath XQuery Reference

Adjusts an xs:dateTime value to a specific timezone, or to no timezone at
            all.deterministiccontext-dependentfocus-independentdeterministiccontext-independentfocus-independent If $timezone is not specified, then the effective value of
               $timezone is the value of the implicit timezone in the dynamic
            context. If $arg is the empty sequence, then the function returns the empty
            sequence. If $arg does not have a timezone component and $timezone is
            the empty sequence, then the result is $arg. If $arg does not have a timezone component and $timezone is
            not the empty sequence, then the result is $arg with $timezone
            as the timezone component. If $arg has a timezone component and $timezone is the empty
            sequence, then the result is the local value of $arg without its timezone
            component. If $arg has a timezone component and $timezone is not the
            empty sequence, then the result is the xs:dateTime value that is equal to
               $arg and that has a timezone component equal to
            $timezone. Assume the dynamic context provides an implicit timezone of -05:00
                  (-PT5H0M).fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00'))xs:dateTime('2002-03-07T10:00:00-05:00')fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00-07:00'))xs:dateTime('2002-03-07T12:00:00-05:00')fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00'),
                  $tz-10)xs:dateTime('2002-03-07T10:00:00-10:00')fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00-07:00'),
                  $tz-10)xs:dateTime('2002-03-07T07:00:00-10:00')fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00-07:00'),
                  xs:dayTimeDuration("PT10H"))xs:dateTime('2002-03-08T03:00:00+10:00')fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T00:00:00+01:00'),
                  xs:dayTimeDuration("-PT8H"))xs:dateTime('2002-03-06T15:00:00-08:00')fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00'),
                  ())xs:dateTime('2002-03-07T10:00:00')fn:adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00-07:00'),
                  ())xs:dateTime('2002-03-07T10:00:00') A dynamic error is raised  if $timezone
            is less than -PT14H or greater than PT14H or is not an
            integral number of minutes.