xref: /PHP-7.3/ext/date/tests/bug71525.phpt (revision b746e698)
1--TEST--
2Bug #71525 (Calls to date_modify will mutate timelib_rel_time, causing date_date_set issues)
3--INI--
4date.timezone=UTC
5--FILE--
6<?php
7$date = new DateTime('2011-12-25 00:00:00');
8$date->modify('first day of next month');
9$date->setDate('2012', '1', '29');
10var_dump($date);
11--EXPECTF--
12object(DateTime)#%d (3) {
13  ["date"]=>
14  string(26) "2012-01-29 00:00:00.000000"
15  ["timezone_type"]=>
16  int(3)
17  ["timezone"]=>
18  string(3) "UTC"
19}
20