strtotime fails for valid date
- by Funky Dude
i am doing a project where i need to output date of orders. and i do the following inside a for loop
<?php echo date('M d, Y g:i A',strtotime($order['Order']['created']));?>
for some strange reason, sttotime returns false. (Dec 31, 1969 7:00 PM appears instead.)
i made sure $order['Order']['created'] is not empty and is valid.
even stranger, that exact same piece of code works fine on the other page, only different is that, that one is not in a loop. but that cant be the reason right?
i set timezone to America/New_York and $order['Order']['created'] is mysql timestamp.
var_dump on said variable
string(27) "2010-06-16 20:12:51"