ghost
Results
1
comments of
ghost
我猜是 在**旧版本**或是 **禁用了 NO_ZERO_DATE** 的**MySQL**版本中, datetime/date 类型支持值为 0000-00-00 00:00:00 或 0000-00-00. **表现为:** 强制转换后, 值会变成 -0001-11-30 00:00:00 或 -0001-11-30 . **原因:** date('Y-m-d H:i:s', strtotime('0000-00-00 00:00:00')) **文档**中也提到过这个问题: https://www.php.net/manual/zh/datetime.formats.php **解决方法, 提供个思路** ``` class...