Page 1 of 1

Configure time zone(HELP)

Posted: Mon Feb 27, 2012 8:00 am
by Php Beginner
Hi there,

I am having some minor difficulties on configuring the time zone.

Here is the line:

Code: Select all

$thedate=date("U"); //get unix timestamp 
$displaytime=date("F j, Y, g:i a");
The line above not displaying the correct time zone where I currently in. I want to set the time zone to UTC+8.00.

How to set it? Please advise.

Re: Configure time zone(HELP)

Posted: Mon Feb 27, 2012 11:55 am
by temidayo
What you need is date_default_timezone_set.
http://www.php.net/manual/en/function.d ... ne-set.php