...

View Full Version : mysql time zone



thindrakhya
11-09-2007, 01:21 AM
hi ,

i am using following functions



$time = time();
echo("*************");
echo($time);
echo("*************");
echo(date("j M Y H:i:s", $time));
echo("*************");
echo("<br>");
$now = strtotime('today');
echo($now);

echo("<br>");
echo(date("j M Y H:i:s", $now));


But my browser is showing the GMT time not my zone time

Everything was ok 2 week but now it is showing gmt
I have not chnaged anything
How do my zone gets changed

And how to change my zone back to sysdney time zone

Is this PHP 5 or mysql problem

felgall
11-09-2007, 02:10 AM
Since there is no SQL in what you posted (only PHP) it can't possibly be an SQL problem.

Try adding the following statement to the top of your script:

putenv("TZ=Australia/Sydney");



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum