DateDiff return different result for each timezones : <p>I have problem with PHP DateDiff, i dont understand why each timezone returns different results, for example in this case Prague return 0 month, and US return 1 month.</p>

<p>What do this difference and how i return 1 month (instead 30 days, when i adding 1 month) as expected?</p>

<p>code Europe/Prague:</p>

<pre><code>date_default_timezone_set("Europe/Prague");
$from = new \DateTimeImmutable('2016-09-01');
$to = $from-&gt;add(new \DateInterval('P1M'));
var_dump($from);
var_dump($to);
var_dump($from-&gt;diff($to)-&gt;m);
var_dump($from-&gt;diff($to)-&gt;d);
</code></pre>

<p>result Europe/Prague:</p>

<pre><code>object(DateTimeImmutable)#1 (3) {
  ["date"]=&gt;
  string(26) "2016-09-01 00:00:00.000000"
  ["timezone_type"]=&gt;
  int(3)
  ["timezone"]=&gt;
  string(13) "Europe/Prague"
}
object(DateTimeImmutable)#3 (3) {
  ["date"]=&gt;
  string(26) "2016-10-01 00:00:00.000000"
  ["timezone_type"]=&gt;
  int(3)
  ["timezone"]=&gt;
  string(13) "Europe/Prague"
}
int(0)
int(30)
</code></pre>

<p>--</p>

<p>code US/Pacific:</p>

<pre><code>date_default_timezone_set("US/Pacific");
$from = new \DateTimeImmutable('2016-09-01');
$to = $from-&gt;add(new \DateInterval('P1M'));
var_dump($from);
var_dump($to);
var_dump($from-&gt;diff($to)-&gt;m);
var_dump($from-&gt;diff($to)-&gt;d);
</code></pre>

<p>result US/Pacific:</p>

<pre><code>object(DateTimeImmutable)#2 (3) {
  ["date"]=&gt;
  string(26) "2016-09-01 00:00:00.000000"
  ["timezone_type"]=&gt;
  int(3)
  ["timezone"]=&gt;
  string(10) "US/Pacific"
}
object(DateTimeImmutable)#4 (3) {
  ["date"]=&gt;
  string(26) "2016-10-01 00:00:00.000000"
  ["timezone_type"]=&gt;
  int(3)
  ["timezone"]=&gt;
  string(10) "US/Pacific"
}
int(1)
int(0)
</code></pre>
