Nathan Nobbe <quickshiftin@xxxxxxxxx> hat am 26. April 2012 um 06:40
geschrieben:
>
> INSERT TIMESTAMP: 1335414561
> INSERT DATE TIME: 2012-04-26 4:29:21
>
> But then from the interactive interpreter on the same box (same php.ini
as
> well):
>
> php > echo date("Y-m-d G:i:s", 1335414561);
> 2012-04-25 22:29:21
>
> I get this same output from another random computer of mine and I've
> verified date.timezone is consistent in both environments.
>
This definitly looks like a timezone offset!
Try the following code in your environments.
$date = new DateTime ( );
$tz = $date -> getTimezone ();
echo $tz -> getName ();
PHP for CLI mode has a different php.ini than the one for apache2. Maybe
that is a problem?
Check also
php -i | grep "date.timezone"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP Home]
[Apache Users]
[PHP on Windows]
[Kernel Newbies]
[PHP Install]
[PHP Classes]
[Pear]
[Postgresql]
[Postgresql PHP]
[PHP on Windows]
[Find Someone]
[PHP Database Programming]
[PHP SOAP]