xref: /PHP-8.1/ext/date/tests/bug74173.phpt (revision 091c0920)
1--TEST--
2Bug #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
7$prg = $utc->setTimeZone(new \DateTimeZone('Europe/Prague'));
8echo $prg->format('c') . "\n";
9$prg->getTimestamp();
10echo $prg->format('c') . "\n";
11?>
12--EXPECT--
132016-10-30T02:00:00+02:00
142016-10-30T02:00:00+02:00
15