I noticed that when the time and timezone of the client computer is wrong then the time displayed inside the world bock is also wrong. So, I guess it might be better to get the time data from internet time servers and not calculating it based on the client timezone and clock settings.

Just an idea, but of course I might be wrong

Comments

akagroundhog’s picture

+1. I'm not pretty sure about timeservers, but to get time at the page load via php (server time, time() function) and then updating it via javascript might be a good idea.

jarry’s picture

Agree. This should be server-time, not client-time! Every good webhosting-company takes care of time-synchronization of their servers, but only a few clients bother with this. And if a client does not have time on his computer synchronized, he gets wrong time.

BTW, in time-zones I'm missing something like GMT or UTC (I know I can select UK instead)...

agrigor1’s picture

If you use the server time, then you will have problem with clients not being at the same timezone with the server. The time displayed should not be the server time, but a calculated time based on server time and client time zone. This means that there must be a mechanism to find the client timezone and since I am not a programmer I dont know how complex this would be using PHP.

I suggested time servers because these must do this calculation for us and give the correct time for the client. Of course if the client uses proxy servers (e.g. anonymity browsing) then he will not the correct time.

Forgive me if I say something wrong. I am not a web programmer anyway.