Page 1 of 1

PHP time

Posted: Sat Sep 19, 2009 4:24 am
by jade756
hello :D

I used the date('H') php function..
however, its output is 9 instead of 17 (since its 5 pm here)

can you suggest a better function to get the correct system time?
thanks in advance :D

Re: PHP time

Posted: Sat Sep 19, 2009 5:04 am
by Mark Baker
Either your server clock is very, very wrong, or it's in a different timezone.

Assuming it's timezone, then use:

Code: Select all

 
date_default_timezone_set('Europe/London');