Hello Giuseppe,

could you give a little bit more details? I guess you are setting a date on
client side and sent the serialized entity to the server, but are you
working with GWT, android or inside a classic JVM?

If you are working with GWT, I just can say that the Date fields are
serialized using the milliseconds time value. By default, this time value
is set accordingly to the client time zone. Then, this time value is sent
to the server. The milliseconds time value is totally unchanged but
interpretated accordingly to the server time zone which could lead to
*display* distinct hours and date since when its midnight in Paris its 6pm
in New York, but it's the same time.
In that case, you can override the default behaviour by implementing your
own custom serializers e.g. DateCustomSerializer (see
https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideCustomSerialization
).

Best regards,
Thierry Boileau


I am updating my entity using:
>
> u.setLastAccessDate(new Date());
>
> the datetime set to the entity is: Mon Jun 18 11:39:39 CEST 2012 but the
> sent to the server when I call service.updateEntity(u); is two hours more.
>
> How to fix it?
>
> Thank you.
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2971796
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2972161

Reply via email to