我有以下代码20191027作为结果输出。
如果我修改第二行(即将时区设置为奥克兰),它会给我结果20191028。为什么是这样?
date_default_timezone_set("Europe/London");
#date_default_timezone_set("Pacific/Auckland");
$date_format = 'Ymd';
$day = "Sunday 4 week ago";
$start_of_the_week = strtotime($day);
$next_day = $start_of_the_week + (60 * 60 * 24 * 1);
$next_day = date($date_format, $next_day);
echo $next_day;
检查 2 个输出:
https://3v4l.org/A7ppT (20191027)
https://3v4l.org/Mfto3 (20191028)
qq_遁去的一_1
偶然的你
翻翻过去那场雪