Page 1 of 1

match time of server computer with local computer

Posted: Tue Jul 31, 2007 2:02 pm
by kanchan
do you guys know how to match time of server computer with local computer.. my server time is about 7:35 less than my local time ... so how can i manage it?? can you provide me the code??

Posted: Tue Jul 31, 2007 3:32 pm
by impulse()
Is it not possible you can correct the time on the server and then install a time server on the server and synchronize your local computer with the server?

I don't think PHP could handle this.

Posted: Tue Jul 31, 2007 3:34 pm
by VladSun
If they are Linux OS, you can use this:

Code: Select all

netdate time.nrc.ca
hwclock --systohc
You can put it in crontab ...

Posted: Tue Jul 31, 2007 6:50 pm
by feyd
Take a look at putenv() in relation to time()/date().

Posted: Tue Jul 31, 2007 10:03 pm
by kanchan
Can't we trap the server time first and then and add the time difference in that code?? Please post me the code..... :(

Posted: Tue Jul 31, 2007 10:10 pm
by Zoxive
kanchan wrote:Can't we trap the server time first and then and add the time difference in that code?? Please post me the code..... :(
Thats thing about these forums, we are here to help you learn, not do stuff for you.

Post some of YOUR code of you attempting this, then you will get some feedback and such.