datetime - php timezone returns empty array -



datetime - php timezone returns empty array -

i have server , local development machine. on locale machine, if want create new datetimezone utc, it's ok, response:

php -r '$a = new \datetimezone("utc"); var_dump($a);' class datetimezone#1 (2) { public $timezone_type => int(3) public $timezone => string(3) "utc" }

but on other , on server, if type in same command this:

php -r '$a = new \datetimezone("utc"); var_dump($a);' object(datetimezone)#1 (0) { }

in both cases date.timezone set europe/berlin in apache2 , in cli config file.

any idea?

ok, found problem since. server had php 5.4 local php 5.5, in 5.5 there __tostring() method, in 5.4 it's not there yet.

datetime php-5.4

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -