SmartGWT version: 2.4 LPGL
Browser version: Firefox 4
- All clients accesing our application are always within the same timezone.
- The application store dates in UTC in the database.
- All these UTC datetimes are sent from the server to clients using the following format: yyyy-MM-dd'T'HH:mm:ss+00:00 (e.g: 2011-04-19T22:00:00+00:00).
- My application starts like:
- Form controls and ListGrids are populated with UTC datetimes properly. They came in UTC and so they still appear like that on screen.
Here is the issue:
- Absolutely all our clients are within one single timezone (GMT+02:00).
- When I hit save on any form with datetime controls all datetimes are sent to our server rolled back 2 hours.
Taking into account that:
- SmartGWT can clearly see that all receiving datetimes are UTC (I attach +00:00 at the end of all of them).
- I instructed SmartGWT that all dates should be shown in UTC (DateUtil.setDefaultDisplayTimezone("+00:00")), hence, SmartGWT does not alter them in anyway while populating controls. This is completely correct.
... then why does it incorrectly rollback all datetimes 2 hours before sending them to the server when they are already UTC? Why does it seem to take into account the client browser´s timezone?
Browser version: Firefox 4
- All clients accesing our application are always within the same timezone.
- The application store dates in UTC in the database.
- All these UTC datetimes are sent from the server to clients using the following format: yyyy-MM-dd'T'HH:mm:ss+00:00 (e.g: 2011-04-19T22:00:00+00:00).
- My application starts like:
Code:
DateUtil.setDefaultDisplayTimezone("+00:00"); DateUtil.setAdjustForDST(false);
Here is the issue:
- Absolutely all our clients are within one single timezone (GMT+02:00).
- When I hit save on any form with datetime controls all datetimes are sent to our server rolled back 2 hours.
Taking into account that:
- SmartGWT can clearly see that all receiving datetimes are UTC (I attach +00:00 at the end of all of them).
- I instructed SmartGWT that all dates should be shown in UTC (DateUtil.setDefaultDisplayTimezone("+00:00")), hence, SmartGWT does not alter them in anyway while populating controls. This is completely correct.
... then why does it incorrectly rollback all datetimes 2 hours before sending them to the server when they are already UTC? Why does it seem to take into account the client browser´s timezone?
Comment