Re: Wrong Date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Darvin Denmian wrote:
Thanks for your reply....

- I'm running Red Hat Linux (5.3)
- The system timezone is set to America/Sao_Paulo

I'm running a stand-alone php script (crontab) , and I don't know how PHP
output this wrong hour.

The output of command "php -i " shows:

Default timezone => America/Sao_Paulo

I don't know what to do  :(

Thanks !




On Fri, Oct 16, 2009 at 2:14 PM, Thodoris <tgol@xxxxxxxxxx> wrote:
Hello,

My currently timezone is set to : America/Sao_Paulo
My currently date/time is ok: Fri Oct 16 13:04:45 BRT 2009
But when I execute "echo date("d/m/Y H:i:s");" the output presented
have +1 hour

Bellow [date] of php.ini:

date

date/time support => enabled
"Olson" Timezone Database Version => 2008.2
Timezone Database => internal
Default timezone => America/Sao_Paulo

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value


Thanks


Assuming you have a unix-like OS and the timezone you mention is set to the
system clock I will have to guess that PHP uses different zone from the
system.

Try setting the date.timezone setting in your php.ini and see what happens
(don't forget to restart the web server to make changes take effect) or use
the ini_set().

--
Thodoris



1. It is possible that the php.ini files are different.
2. Run phpinfo() to check where the php.ini file your web server uses is located.
3. Check that the timezone settings are correct.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux