1497154554827.0 This time is a timestamp returned by an API, which is a millisecond timestamp
How to convert to timestamp format in mysql
The transfer time on the time conversion website is 2017/6/11 12:15:54
Divide by 1000 and use date to convertecho date('Y-m-d H:i:s', 1497154554827.0 / 1000);
echo date('Y-m-d H:i:s', 1497154554827.0 / 1000);
I also tried this method and the result was 2017-06-11 06:15:54. It doesn’t match the poster’s 2017/6/11 12:15:54. I don’t know if the poster wrote it wrong.
Divide by 1000 and use date to convert
echo date('Y-m-d H:i:s', 1497154554827.0 / 1000);
I also tried this method and the result was 2017-06-11 06:15:54. It doesn’t match the poster’s 2017/6/11 12:15:54. I don’t know if the poster wrote it wrong.