Hi,
Sorry for asking a question that has been asked many times on the forum, but I've read all the posts, tried a few recommendations and I'm still scratching my head.
The issue is with dates returned from the database with midnight timestamp (00:00:00) and how they are adjusted by the client, which is a big issue if the client is a timezone with a negative offset since it adjusts the date to T-1. Our users are in located in EST and I am unable to stop the date adjusting to the EST timezone despite trying several methods.
I have tried:
1. Stop the client adjusting the timezone by setting default timezone
2. Format the date on the client using a different time zone for
3. Adjust the date to a different timezone on the server with -ve offset.
But none of these methods work. In more detail:
For 1 I have tried the following onModuleLoad()
When I select a list grid and output what value is selected I get the following in my Console:
Corresponding value in the RPC:
So that doesn't work.
OK, so I thought I'd try 2 above and set the format in the ListGrid so that it converts the date to a different timezone using a cell formatter, however, GWT's DateTimeFormatter does not support time zones.
So I then tried 3 above by setting the timezone for each date field on the server so it was set to some -ve offset and I removed the default timezone in CREED, but it still adjusts:
Console RPC:
List Grid select gives shows value has been adjusted:
Please let me know if any of these are along the right lines.
Thanks
Stephen
Sorry for asking a question that has been asked many times on the forum, but I've read all the posts, tried a few recommendations and I'm still scratching my head.
The issue is with dates returned from the database with midnight timestamp (00:00:00) and how they are adjusted by the client, which is a big issue if the client is a timezone with a negative offset since it adjusts the date to T-1. Our users are in located in EST and I am unable to stop the date adjusting to the EST timezone despite trying several methods.
I have tried:
1. Stop the client adjusting the timezone by setting default timezone
2. Format the date on the client using a different time zone for
3. Adjust the date to a different timezone on the server with -ve offset.
But none of these methods work. In more detail:
For 1 I have tried the following onModuleLoad()
Code:
DateUtil.setDefaultDisplayTimezone("+00:00"); DateUtil.setAdjustForDST(false);
Code:
08:37:24.767:MUP7:WARN:Log:Selected event with id: 4671554, selectedEventDate: Sun Apr 14 20:00:00 GMT-400 2013
Code:
"eventDate":"2013-04-15T00:00:00+0800"
OK, so I thought I'd try 2 above and set the format in the ListGrid so that it converts the date to a different timezone using a cell formatter, however, GWT's DateTimeFormatter does not support time zones.
So I then tried 3 above by setting the timezone for each date field on the server so it was set to some -ve offset and I removed the default timezone in CREED, but it still adjusts:
Console RPC:
Code:
eventDate":"2013-04-04T00:00:00-0400
Code:
selectedEventDate: Wed Apr 03 20:00:00 EDT 2013
Thanks
Stephen
Comment