mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
Test for #50475
This commit is contained in:
parent
c11850b406
commit
5126ac9ab0
18
ext/date/tests/bug50475.phpt
Normal file
18
ext/date/tests/bug50475.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #50475 (DateTime::setISODate followed by DateTime::setTime)
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('Asia/Calcutta');
|
||||
|
||||
$date = new DateTime('18-01-2009 00:00:00');
|
||||
|
||||
$date->setISODate(2009, 6, 1);
|
||||
|
||||
var_dump($date->format('Y-m-d H:i:s'));
|
||||
|
||||
$date->setTime(8, 0);
|
||||
var_dump($date->format('Y-m-d H:i:s'));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(19) "2009-02-02 00:00:00"
|
||||
string(19) "2009-02-02 08:00:00"
|
Loading…
Reference in New Issue
Block a user