tags:

views:

55

answers:

3

On my website, I use the php time() function to display the time. A week ago I compared the time difference between the time returned by the time() function and the time on my computer(I use windows). The time difference was about a minute and 10 seconds but now I checked again and the time difference has grown to a minute and 50 seconds. Can anyone explain how this is possible?

A: 

Set your time zone by date_default_timezone_set()

I'm not sure this would help.

killer_PL
Seems unlikely to be a server time zone issue.
Hammerite
A: 

On some Linux dystros time is resynced via NTP on system restart only. You may install ntp daemon which will keep time delta in <10ms constantly.

BarsMonster
A: 

I think this confusing made from your computer and server. One week you may compare with your computer time and now you check with server time. Make sure about this. Because server time is differ from our local computer time.

Karthik