I'm eceiving an unknown datetime format from a JSON file:
"expectedStartTime":1431469800000
anyone recognize this format, and can guide me into how to convert it to "YYYY-MM-DD H:i:s" format?
Expecting it is a timestamp in milliseconds it should work like this:
$json = '{"expectedStartTime":1431469800000}';
$arr = json_decode($json,true);
echo date("Y-m-d H:i:s", $arr['expectedStartTime']/1000);
The given value will output:
2015-05-13 00:30:00
date("Y-m-d H:i:s", ($expectedStartTime/1000))