PHP正在计算我的日期错误!
echo "Calc: ";
echo date("d.m.Y G:i", $date);
echo "(" . $date . ")";
echo "+";
echo gmdate("H:i:s", 86400);
echo "(86400)";
echo "=";
$date = $date + 86400;
echo date("d.m.Y G:i", $date);
echo "(" . $date . ")";
显示器:
Calc: 25.03.2017 11:02 (1490436120) +00:00:00 (86400) = 26.03.2017 12:02 (1490522520)
但是为什么PHP会这样做?它只在周六到周日的夜晚才会发生!
答案 0 :(得分:2)
这里没有错误,因为本周末我们将转向DST