xref: /PHP-7.0/ext/date/tests/bug50475.phpt (revision d4757036)
1--TEST--
2Bug #50475 (DateTime::setISODate followed by DateTime::setTime)
3--FILE--
4<?php
5date_default_timezone_set('Asia/Calcutta');
6
7$date = new DateTime('18-01-2009 00:00:00');
8
9$date->setISODate(2009, 6, 1);
10
11var_dump($date->format('Y-m-d H:i:s'));
12
13$date->setTime(8, 0);
14var_dump($date->format('Y-m-d H:i:s'));
15?>
16--EXPECT--
17string(19) "2009-02-02 00:00:00"
18string(19) "2009-02-02 08:00:00"