좋아, 내가 곤두박질. 다음은 내가 가지고있는 두 날짜 객체입니다 :
// $startDate value
DateTime::__set_state(array(
'date' => '2017-11-05 00:00:00.000000',
'timezone_type' => 3,
'timezone' => 'America/Chicago',
))
// $endDate value
DateTime::__set_state(array(
'date' => '2017-11-05 23:59:00.000000',
'timezone_type' => 3,
'timezone' => 'America/Chicago',
))
둘 다 정확히 동일한 시간대 정보를 가지고 있습니다. 그러나 내가 $startDate->format(DateTime::ISO8601)
과 $endDate->format(DateTime::ISO8601)
을 실행할 때 다른 시간대 오프셋을 얻습니다.
// $startDate->format(DateTime::ISO8601)
2017-11-05T00:00:00-0500
// $endDate->format(DateTime::ISO8601)
2017-11-05T23:59:00-0600
어떤 원인 일 수 있습니까?
11 월 5 일은 DST 종료 날짜이므로 UTC 오프셋이 변경됩니다. – aynber