Re: Wrong time being displayed by PHP!

From: Date: Tue, 16 Oct 2012 21:05:34 +0000
Subject: Re: Wrong time being displayed by PHP!
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-319492@lists.php.net to get a copy of this message
On Tue, Oct 16, 2012 at 4:19 PM, Richard S. Crawford <rscrawford@mossroot.com> 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/

« previous php.general (#319492) next »