Re: Wrong time being displayed by PHP!

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

 



On Tue, Oct 16, 2012 at 4:19 PM, Richard S. Crawford
<rscrawford@xxxxxxxxxxxx> wrote:
>
> Thanks for the suggestion. Unfortunately the problem seems to be that PHP
> thinks the America/Los_Angeles timezone is the same as EDT. I'm not sure
> how to approach this issue.

    Per list rules, just a gentle reminder: please don't top-post.

    With regard to debugging your issue, it's extremely unlikely that
it's PHP's fault, since no one else has the same issue.  However, it
does indeed sound as though there's a configuration mismatch or a bad
setting of the system clock (as suggested earlier by myself and
others).  What's the output when you run the code below?

<?php

if (php_sapi_name() == 'cli') {
        define('NL',PHP_EOL);
} else {
        define('NL','<br/>'.PHP_EOL);
}

echo date_default_timezone_get().NL;

echo date('r').NL;

echo gmdate('r').NL;

echo time().' ('.date('Z').')'.NL;

echo trim(`date`).NL;

?>

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

-- 
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