answered
2020-02-04 07:18:29 +0800
JustinFrost 145 ● 1 ● 6 @MDuchemin
If I change the system property -Duser.timezone=UTC then when I execute :
smartUpdate("toDate", value);
with a java,util.date of 2020-01-24 09:00
Then the DateImpl object on the client side has the associate moment object UTC date set correctly to the above. When I execute the following to get the javascript date:
setFromDate: function(val){
if (val instanceof DateImpl)
val = val._moment.toDate();
Because I am creating a javascript date it uses the local timezone applied to the UTC. I have worked around this by hacking the javascript date to be equivalent to the UTC date (which has the time correct).
Do you know why none of the ZK PREFERREDTIMEZONE methods described in the documentation are working for me ?
It seems to be using the java default timezone all of the time.
Thanks.