-1

なぜそれらの日付の間に私は5,9....を取得し、別の年を使用すると6を取得しますか???? それは2008年3月と2008年にのみ発生します...なぜ時間差があるのですか?

<?php
 $from = '2008-03-04';
 $to = '2008-03-10';

 echo datediff($from,$to);

 $from = '2010-03-04';
 $to = '2010-03-10';

 echo datediff($from,$to);

 function datediff($from,$to)
 {
  $diff = strtotime($to) - strtotime($from);
  $diff = $diff/(60*60*24);
  return $diff;
 }
?>
4

1 に答える 1

3

夏時間

于 2010-02-10T00:54:29.360 に答える