Forum Moderators: coopster

Message Too Old, No Replies

need help with date function

not giving me the right time...

         

PokeTech

12:10 am on Jun 4, 2008 (gmt 0)

10+ Year Member



Well I'm using the date function and Its not giving me the right time... I'm using this:

echo date('l jS \of F Y h:i:s A');

but its like 5 hours of for me or something. I'm assuming it has something to do with timezones but what am I doing wrong?

eelixduppy

12:15 am on Jun 4, 2008 (gmt 0)



You might want to take a look at date_default_timezone_set [us2.php.net]() and see if that helps.

PokeTech

12:17 am on Jun 4, 2008 (gmt 0)

10+ Year Member



it keeps giving me this:

Fatal error: Call to undefined function: date_default_timezone_set()

eelixduppy

12:28 am on Jun 4, 2008 (gmt 0)



Then you don't have PHP >= 5.1.0 so you are going to have to set the timezone [us2.php.net] in your php.ini file either by manually editing the file or by using ini_set [php.net]() before you call date().