Re: user unfriendliness of timezone format Agreed. I was using this to report a timezone back to the server where I was matching it to one of the defined timezones in Java which has had mixed success.
I'll investigate more on the Data.toString(), do you happen to know if the functionality is legitimate GWT client code that is consistent between browsers? Sometimes with date objects they will work in debug mode (you just get the regular Java version) but not in final compiled code. There is more information on dates here: http://code.google.com/p/gwt-examples/wiki/gwtDateTime Generally I've the area of client site timezones a bit of a pig to work with, has anyone got any tips/links for working with timezones? Cheers, Chris. On Nov 6, 5:13 pm, Yozons Support on Gmail <[email protected]> wrote: > > Take a look at the DataTimeFormat object. I use the following to > > determine the client's timezone: > > > /** > > * Get the client's time zone in the format "GMT[+-]hh:mm" > > * @return > > */ > > public static String getTimeZone() { > > final Date now = new Date(); > > > final String timezone = > > DateTimeFormat.getFormat("zzzz").format > > (now); > > > Log.info("Client timezone = " + timezone); > > > return timezone; > > } > > Unfortunately, it uses a user-unfriendly "GMT+-hh:mm" format for timezone > rather than the names most people are familiar with, such as in the US > mainland we have EST, CST, MST and PST. Few here think in terms of offset > from GMT. And somehow the Date.toString() method has the nicer name I've > noticed, but the DateTimeFormat seems to not want to give it back even with > just 'z' or 'zzz'. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
