Adding/Calculating time with php.
Posted: Thu Jan 29, 2004 6:41 am
Hi,
I'm a newbie here and reletivly new to php, i hope any of you can help.
What im wanting to do is show two times on a web page. The first time is the time that is taken from the server with the date() function, the second is a calculated time. (ie. calculating the time of one country from the server time of the other).
Can anyone suggest some PHP code to take the time from the server and add 5 hours to it while still displaying the proper AM or PM and reseting the hour back to 1 oclock after it go's past 12 oclock. The date dunction that im using is date(g:i A) to show eg. "3:45 PM".
If anybody could help, that would be great.
Cheers...Nickuss.
I'm a newbie here and reletivly new to php, i hope any of you can help.
What im wanting to do is show two times on a web page. The first time is the time that is taken from the server with the date() function, the second is a calculated time. (ie. calculating the time of one country from the server time of the other).
Can anyone suggest some PHP code to take the time from the server and add 5 hours to it while still displaying the proper AM or PM and reseting the hour back to 1 oclock after it go's past 12 oclock. The date dunction that im using is date(g:i A) to show eg. "3:45 PM".
If anybody could help, that would be great.
Cheers...Nickuss.