bug74173.phpt 381 B

1234567891011121314
  1. --TEST--
  2. Bug #74173 (DateTimeImmutable::getTimestamp() triggers DST switch in incorrect time)
  3. --FILE--
  4. <?php
  5. $utc = new \DateTimeImmutable('2016-10-30T00:00:00+00:0');
  6. $prg = $utc->setTimeZone(new \DateTimeZone('Europe/Prague'));
  7. echo $prg->format('c') . "\n";
  8. $prg->getTimestamp();
  9. echo $prg->format('c') . "\n";
  10. ?>
  11. --EXPECT--
  12. 2016-10-30T02:00:00+02:00
  13. 2016-10-30T02:00:00+02:00