xref: /php-src/ext/date/tests/gh10583.phpt (revision cbac68df)
1--TEST--
2Bug GH-10583 (DateTime modify with tz pattern should not update linked timezone)
3--FILE--
4<?php
5
6$dt = new DateTime('2015-01-01 00:00:00+00:00');
7var_dump($dt->format('c'));
8var_dump($dt->modify('+1 s')->format('c'));
9
10$dt = new DateTimeImmutable('2015-01-01 00:00:00+00:00');
11var_dump($dt->format('c'));
12var_dump($dt->modify('+1 s')->format('c'));
13?>
14--EXPECT--
15string(25) "2015-01-01T00:00:00+00:00"
16string(25) "2015-01-01T00:00:00+00:00"
17string(25) "2015-01-01T00:00:00+00:00"
18string(25) "2015-01-01T00:00:00+00:00"
19