Hi Christian

You were right: as I'm running BaseX on a VM I checked the time on the VM's server and this is the time I get when runing the XQuery.
Your workaround solution with the adjust-dateTime-to-timezone function also worked as expected.

Thnx!

Best regards
Mike



From: Christian Grün <christian.gruen@gmail.com>
To: Mike Cobo <mikecobo@yahoo.com>
Cc: "basex-talk@mailman.uni-konstanz.de" <basex-talk@mailman.uni-konstanz.de>
Sent: Wednesday, April 27, 2016 3:43 PM
Subject: Re: [basex-talk] Print local time

Hi Mike,

> Stand vom 27.04.2016 13:21:34 Uhr

That’s interesting; the same query here in Konstanz/Germany gives me:

<p>Stand vom 27.04.2016
15:38:53 Uhr</p>

Maybe this is due to your server settings?

You can enforce the time adjustment as follows:

  adjust-dateTime-to-timezone(
    current-dateTime(),
    xs:dayTimeDuration('PT2H')
  )

It is true that the XQuery 3.1 F&O spec allows you to specify a place
[1]. This hasn’t been implemented yet…

Hope this helps,
Christian


[1]
https://www.w3.org/TR/xpath-functions-31/#rules-for-datetime-formatting