Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这样的日期值1369195200000,我试图将它转换为这样的日期
1369195200000
$date = 1369195200000; $result = date("Y-m-d", $date);
但它会像这样45358-01-25明显地返回年份是错误的......有没有得到正确的年份?来自$date数据库。
45358-01-25
$date
时间以毫秒为单位,需要除以 1000。
$date = 1369195200000; $result = date("Y-m-d", $date / 1000);