format('m/d/Y,H:i:s'));//Thisisa">
Why can't procedural code get the same results as object-oriented code? I have legacy code that requires program results. Please note that I have a workaround but I would like to understand why the program code is not getting the local time.
`$dt = new DateTime("now", new DateTimeZone('America/Los_Angeles')); $now = strtotime($dt->format('m/d/Y, H:i:s')); //This is a work-around which works $oo = date('Y-m-d H:i:s',$now); //Procedural Code $now = date_timestamp_get($dt); $pc = date('Y.m.d H:i:s',$now); `
Answer in comments, courtesyAdyson