我在使用PHP strtotime函数是,遇到了+9时区的问题。 $first_day = strtotime($year.'-'.$i.'-01 00:00:00'); return json($first_day); 得到的结果是 2024-01-01 09:00:00 请问到底该怎么解决才能使 strtotime 直接得到0点的时间戳? 我检查了系统的时区,timedatectl 返回的结果 Local time: Wed 2024-01-03 22:15:09 CST Universal time: Wed 2024-01-03 14:15:09 UTC RTC time: Wed 2024-01-03 14:15:09 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: yes NTP service: active RTC in local TZ: no PHP date_default_timezone_get() 返回的是PRC。 即便使用 DateTime 得到的依然是2024-01-01 09:00:00。 new DateTime($year.'-'.$i.'-01', new DateTimeZone('Asia/Shanghai'));