By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,625 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

date_default_timezone_set() returns a 4-hour late time

P: n/a
I live in Brazil so I used the following script to return time:

<?
date_default_timezone_set('America/Sao_Paulo');
echo date('h:i:s');
?>

But it returns 7:30 while it's actually 11:30 here. I checked the
server time, and it is correct on the server. How could I return the
time of São Paulo? Thanks.

May 29 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
>I live in Brazil so I used the following script to return time:
>
<?
date_default_timezone_set('America/Sao_Paulo');
echo date('h:i:s');
?>

But it returns 7:30 while it's actually 11:30 here. I checked the
server time, and it is correct on the server. How could I return the
time of São Paulo? Thanks.
Is the TIME ZONE set correctly on the server?

May 30 '07 #2

P: n/a
On May 29, 9:26 pm, gordonb.du...@burditt.org (Gordon Burditt) wrote:
Is the TIME ZONE set correctly on the server?
Yes it is. It's set to America/Sao_Paulo.

May 30 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.