bug71525.phpt 446 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #71525 (Calls to date_modify will mutate timelib_rel_time, causing date_date_set issues)
  3. --INI--
  4. date.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');
  10. var_dump($date);
  11. ?>
  12. --EXPECTF--
  13. object(DateTime)#%d (3) {
  14. ["date"]=>
  15. string(26) "2012-01-29 00:00:00.000000"
  16. ["timezone_type"]=>
  17. int(3)
  18. ["timezone"]=>
  19. string(3) "UTC"
  20. }