php - How to convert millisecond-level timestamps into standard date display
巴扎黑
巴扎黑 2017-06-12 09:21:17
0
2
1204
  1. 1497154554827.0 This time is a timestamp returned by an API, which is a millisecond timestamp

  2. How to convert to timestamp format in mysql

  3. The transfer time on the time conversion website is 2017/6/11 12:15:54

巴扎黑
巴扎黑

reply all (2)
过去多啦不再A梦

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.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!