I receive from my server (MST timezone) and i convert it to GMT but there is an issue. Today 11 march 2012 the server changed it’s time +1 hour because of daylight change. I query the server from Italy where the daylight did not occur yet (it will occur in 25 march 2012) so when i make the conversion the message i send from the client to the server its not at the right time because it returns minus one hour! For example
I send a message from the client from italy at 12:30 local time
the message is saved on the server at MST time.
After a second i retrieve the same message from the server and i make the conversion locally on the client.
The conversion shows me the that the time i have sent the message was 1 hour before.
That did not happened before the daylight change.
How can i solve this issue?
Any help appreciated.
You can solve this issue by not using local time in your network protocol. Exchange UTC times only between your client and server. Convert to local time for purposes of displaying data to the user.