Monday, October 10, 2011

Date passed via Request Factory always reduced by 8 hours

Hello all,

I've run into a problem with passing dates from a GWT client to a
backend service via Request Factory. It would seem that in my case
that whatever date value my GWT application would pass gets reduced by
8 hours when it reaches the back end service being invoked. This
appears like some automatic timezone adjustment that I was not told
about. This is a problem since the date/time value is always different
from what the client submitted. To further illustrate lets say I have
a DateBox user input on my application whose value is obtained using
DateBox.getValue(). This value is passed on to the back-end via
RequestFactory's serviceContext.myService(value). But when
myService(Date value) on the back end is executed, the value received
is 8 hours less than what was originally sent by the client.

We ran into this problem when we changed the formatting of a DateBox
to simply "MM/dd/yyyy" which resulted in the time value submitted to
00:00:00 from 12:00:00. But the back end would receive a date that is
actually the previous day because it was somehow reduced by 8 hours.

- Owen

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate