search

Home  >  Q&A  >  body text

Failed to convert date timestamp to date format? Is there any other way?

$now = date('Ymd',2375107200);
dump($now);

错误提示:"date() expects parameter 2 to be integer, float given"
微信截图_20180912233143.png


天问天问2296 days ago1258

reply all(1)I'll reply

  • 红色眼睛框

    红色眼睛框2018-09-13 09:07:20

    php date function is limited to January 1, 1970 to January 19, 2038 in some systems (such as Windows)

    Solution http://www.jquerycn.cn/a_14366 (Saw it online)

    reply
    0
  • 天问

    It turns out that date has a limit. Thank you. I just forced the conversion to integer. Although no error was reported, the time was consistent with what you said. Thank you

    天问 · 2018-09-13 09:16:08
  • Cancelreply