datetime - PHP DateTimeZone error -


i've been looking while, used work does'nt anymore , can't find why. 1 of have idea?

$utc_time = datetime::createfromformat('y-m-d h:i:s', $time, new datetimezone('us/eastern')); $utc_time->settimezone(new datetimezone("utc")); // line returns error. return $utc_time->format($dateformat); 

i error: fatal error: call member function settimezone() on non-object.

thanks lot help, hope it's dumb , lost...

in datetime::createfromformat, returns false on failure, leads error.

what value of $time ?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -