Returns the current date and time (with timezone).
fn:current-dateTime
( xs:dateTimeStamp
Returns the current dateTime (with timezone) from the dynamic context. (See .) This is an
xs:dateTime
that is current at some time during the evaluation of a
query or transformation in which fn:current-dateTime
is executed.
This function is . The precise instant during the query
or transformation represented by the value of fn:current-dateTime()
is
implementation-dependent.
If the implementation supports data types from XSD 1.1 then the returned value will be
an instance of xs:dateTimeStamp
. Otherwise, the only guarantees are that it
will be an instance of xs:dateTime
and will have a timezone component.
fn:current-dateTime()
returns an xs:dateTimeStamp
corresponding to the current date and time. For example, a call of
fn:current-dateTime()
might return
2004-05-12T18:17:15.125Z
corresponding to the current time on May 12,
2004 in timezone Z
.
The returned xs:dateTime
will always have an associated timezone, which
will always be the same as the implicit timezone in the dynamic context