Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-09-2007, 12:21 AM   PM User | #1
thindrakhya
New Coder

 
thindrakhya's Avatar
 
Join Date: Jun 2007
Posts: 90
Thanks: 8
Thanked 0 Times in 0 Posts
thindrakhya can only hope to improve
mysql time zone

hi ,

i am using following functions

Quote:
$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
thindrakhya is offline   Reply With Quote
Old 11-09-2007, 01:10 AM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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");
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:19 PM.


Advertisement
Log in to turn off these ads.