current-dateTime() in Orbeon form

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

current-dateTime() in Orbeon form

Chunyu_uk
Hello,

We are facing a strange behaviour of Orbeon form.

The result of current-dateTime() is different with different environment.

We only have a simple output like <xf:output value="current-dateTime()"/>.

It is working fine with one environment and it outputs same as the machine time.
However, it outputs with a different timeZone at other environment that machine has been set as BST. But the output of current-dateTime is American time.

Both environments have the same code.

Please advise.

Thanks,
Chunyu

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: current-dateTime() in Orbeon form

Alessandro  Vernet
Administrator
Hi Chunyu,

Would you have an example of what the out of the current-dateTime() is on both environments?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: current-dateTime() in Orbeon form

Chunyu_uk
Hi Alex,

I used current-dateTime() in a test form of form builder from both environments.
They have exactly same code.

Please see the four screen shots with the outputs and machine time each.

Thanks,
Chunyu


On 15 July 2015 at 07:03, Alessandro Vernet <[hidden email]> wrote:
Hi Chunyu,

Would you have an example of what the out of the current-dateTime() is on
both environments?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/current-dateTime-in-Orbeon-form-tp4660243p4660245.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/X1UFT5a4FuA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

2015-07-15_0845_local.png (20K) Download Attachment
2015-07-15_0844_local.png (119K) Download Attachment
2015-07-15_0843_dev.png (44K) Download Attachment
2015-07-15_0842_dev.png (121K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: current-dateTime() in Orbeon form

Alessandro  Vernet
Administrator
Hi Chunyu,

Got it. I suspect that this is because you have a different user timezone set on those 2 machines. For instance, on my computer, out of the box I get a time in PDT, my local timezone:

2015-07-15T16:23:09.787-07:00

But if I add the following flag to the JVM -Duser.timezone=Australia/Sydney, I'll get the time in the timezone for Sydney.

2015-07-16T09:20:57.608+10:00

If you want to get a consistent time across servers, you might want to explicitly set -Duser.timezone to the same value on those different servers.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet