Tuesday, October 30, 2018

Re: java.util.Date clientside incorrect timezone

Did you find a solution?

Em quinta-feira, 6 de novembro de 2014 10:18:13 UTC-2, Stepan escreveu:
hello everyone!

I have a strange problem with dates. when i work in dev mode all is ok, but when i work in web mode i have problems on client side. 

i have this code on the client side(App gwt + gxt). 

private static Logger log = Logger.getLogger("DateUtils");
log.log(Level.INFO, to + " " + from);
return (int) ((to.getTime() - from.getTime()) / MILLIS_IN_DAY);

This code write in chrome console when i  am use two dates:

Thu Nov 06 14:48:34 GMT+300 2014 DateUtils

INFO: Fri Jan 09 00:00:00 GMT+400 2015 Tue Jan 06 00:00:00 GMT+300 2015 

in Russia we have transition 26 october and  now in Moscow, we have always timezone GMT +3 (in the past has been the time zone GMT +4).
i am apply to java tzupdater and on server side all it is ok. problem only on client side in java.util.Date

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment