Map the date-time to the GMT client (in JavaScript, if it is a web application) before sending it to the server. Let the server work only with GMT (I would say UTC). The same is for date / time display. Send GMT / UTC to the client and let JS localize. In my opinion, this is the only safe way, because you allowed it to work with the users operating system to figure out what time should be.
There are other approaches to business, and if you only need to know what time the client is now, you can just get the offset from him (can be obtained through JS, etc.). But if you need exact dates / times in different places for historical and future dates / times, you can let the client handle this.
PS: In my implementation of TimeZone, I also use the UNIX time format for communication between the client and server. It's just easier to parse, and I believe this is the native date format for JS. I canโt present my code for you now, but for this it should be relatively simple.
Torbjรธrn
source share