Calculating the time difference between two location is not a good thing. In particular, it may change, because in different location there can be a different policy about summer saving time (who needs it anyway? such an archaic pointless trick…) which can change with time.
I would advise the following approach: do all the programming, on all severs and all clients, in UTC time:
http://en.wikipedia.org/wiki/UTC[
^].
This manual page explains how to use it in PHP:
http://www.php.net//manual/en/function.time.php[
^].
…and this one — in Javascript:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC[
^].
And only in one point, in the client-side script, only in showing time in UI, convert UTC time to local. This way, you never need to know the timezone of the server, its summer saving time, anything; you will only need to convert universal UTC time to the client host local time. Having correct local time on the host is a purely local concern, so you won't need any coordination between hosts (everything is already coordinated by UTC :-)), won't need any redundant knowledge in time setting on any of them.
—SA