Hi Yitzhak
The adjust-dateTime-to-timezone function may do what you need. For example,
this converts the current time to UTC.
adjust-dateTime-to-timezone(current-dateTime(), xs:dayTimeDuration('PT0H'))
For EDT, change the duration to "-PT4H". The duration that is needed for US
Eastern time
On 9/9/2022 7:46 PM, ykhab...@bellsouth.net wrote:
Hi Vincent and Martin,
Thanks for the clarification.
I switched to using the Profiling module.
let $before_datetime := convert:integer-to-dateTime(prof:current-ms())
(: current-dateTime() :)
And it is working well.
Am 9/9/2022 um 5:55 PM schrieb ykhab...@bellsouth.net:
Hello,
I am using BaseX v.10.1
It seems that the current-dateTime() function precision is off.
I am validating an XML file against an XSD 1.1 file via Xerces 2.12.2
validator.
And trying to measure a timing of it.
Here is my code.
Am 9/9/2022 um 6:03 PM schrieb Martin Honnen:
I think, due to the functional/declarative language that is XQuery, the
static context defines that current-dateTime() doesn't change during the
execution of a single query, it is part of the static context.
It is defined in the dynamic context:
Hi Vincent and Martin,
Thanks for the clarification.
I switched to using the Profiling module.
let $before_datetime := convert:integer-to-dateTime(prof:current-ms()) (:
current-dateTime() :)
And it is working well.
2022-09-09T17:31:34.466Z
2022-09-09T17:31:34.538Z
The last
Hello,
I am using BaseX v.10.1
It seems that the current-dateTime() function precision is off.
I am validating an XML file against an XSD 1.1 file via Xerces 2.12.2
validator.
And trying to measure a timing of it.
Here is my code.
xquery version "4.0";
let $xml :=
Hi Vincent,
Thanks. I am all set.
Regards,
Yitzhak Khabinsky
From: Lizzi, Vincent
Sent: Friday, September 9, 2022 1:55 PM
To: ykhab...@bellsouth.net; 'BaseX'
Subject: RE: [basex-talk] current-dateTime() function precision
Hi Yitzhak
The adjust-dateTime-to-timezone function
Am 9/9/2022 um 6:03 PM schrieb Martin Honnen:
Am 9/9/2022 um 5:55 PM schrieb ykhab...@bellsouth.net:
Hello,
I am using BaseX v.10.1
It seems that the current-dateTime() function precision is off.
I am validating an XML file against an XSD 1.1 file via Xerces 2.12.2
validator.
And trying
Hello Yitzhak,
The current-dateTime() function returns the same value throughout the execution
of a single query.
The Profiling module has functions that provide the current system time, which
is probably more to what you need.
https://docs.basex.org/wiki/Profiling_Module
Kind regards,
9 matches
Mail list logo