Annotation of embedaddon/php/ext/date/tests/bug46268.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #46268 (When call DateTime#setTime, it seems to be called the last modify method too)
                      3: --FILE--
                      4: <?php
                      5: date_default_timezone_set('Asia/Tokyo');
                      6: 
                      7: $now = new DateTime('2008-10-10 01:02:03');
                      8: echo $now->format("Y-m-d H:i:s") . PHP_EOL;
                      9: 
                     10: $now->modify("1 day");
                     11: echo $now->format("Y-m-d H:i:s") . PHP_EOL;
                     12: 
                     13: $now->modify("1 hour");
                     14: echo $now->format("Y-m-d H:i:s") . PHP_EOL;
                     15: 
                     16: $now->setTime(0, 0, 0);
                     17: //date_time_set($now, 0, 0, 0);
                     18: echo $now->format("Y-m-d H:i:s") . PHP_EOL;
                     19: --EXPECT--
                     20: 2008-10-10 01:02:03
                     21: 2008-10-11 01:02:03
                     22: 2008-10-11 02:02:03
                     23: 2008-10-11 00:00:00

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>