Skip to main content

current_datetime

Function current_datetime 

Source
pub fn current_datetime<N: DomNavigator>(
    context: &mut DynamicContext<'_, N>,
    args: Vec<XPathValue<N>>,
) -> Result<XPathValue<N>, XPathError>
Expand description

Implements fn:current-dateTime() - returns the current date and time.

The value is cached in the dynamic context for the duration of the query. Uses the implicit timezone from context if set, otherwise uses local timezone. Preserves fractional seconds from the system clock.