I read a lot of posts here: GWT date processing.
One, in particular, which pierced with me a cord, was this
Sending date and time zone from GAE server to GWT client
In any case, there is a need for a project that I am working on to show days, hours, minutes and intervals as labels in a grid. My team took an approach where all instances of the date and time are transmitted by the client from the server in String format in ISO8601 format. The server time zone must be respected by the client. The use case for biz is that all instances of the date and time are in the "market time", so that any browser that visits the application will see and work with the dates in the "time zone of the market", which occurs at GMT-05: 00 (if Summer Savings) or GMT-06: 00 (if standard time is used).
I posted the source on Github, here:
https://github.com/fastnsilver/gwt-datehandling-example
In particular,...
https://github.com/fastnsilver/gwt-datehandling-example/blob/master/src/main/java/me/fns/gwt/datehandling/client/util/CSTimeUtil.java
and GWTTestCase
https://github.com/fastnsilver/gwt-datehandling-example/blob/master/src/test/java/me/fns/gwt/datehandling/client/util/CSTimeUtilTestGwt.java
in the hope that someone can look at the utility (and test) that we use to process dates and help us understand what we donβt see.
EDIT The main problem is that CSTimeUtil#hoursInDay(Date) not computed correctly in Production mode for transition days. This method is used by other methods (for example, CSTimeUtil#dateToHour(Date) and CSTimeUtil#labelsForDay(Date) ).
I deployed our application with the current implementation of CSTimeUtil and it seems to work, but not quite. I am really confused by alternative test results when, for example, mvn gwt:test runs in GWT mode or in production mode on Windows, where the OS time zone is set to different time intervals other than US GMT-05:00 or GMT-06:00 .