私はphpで次のDateTimeオブジェクトを持っています:
[start1] => DateTime Object (
[date] => 2012-05-21 12:59:59
[timezone_type] => 3
[timezone] => Europe/Berlin
)
[end1] => DateTime Object (
[date] => 2012-05-21 22:36:00
[timezone_type] => 3
[timezone] => Europe/Berlin
)
との結果:
$time->end1->diff($time->start1
は:
DateInterval Object ( [y] => 0 [m] => 0 [d] => 0 [h] => 12 [i] => 36 [s] => 2 [invert] => 1 [days] => 0 )
なぜ9時間ではなく12時間の期間を取得するのですか?