Annotation of embedaddon/php/ext/date/tests/bug39782.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #39782 (setTime() on a DateTime constructed with a Weekday yields incorrect results)
! 3: --FILE--
! 4: <?php
! 5: date_default_timezone_set("GMT");
! 6:
! 7: $dttTest = new DateTime('Dec 10 2006 Next Wednesday');
! 8: echo $dttTest->format('D M j Y - H:i:s') . "\n";
! 9:
! 10: $dttTest->setTime(12, 0, 0);
! 11: echo $dttTest->format('D M j Y - H:i:s') . "\n";
! 12:
! 13: $dttTest->setTime(12, 0, 0);
! 14: echo $dttTest->format('D M j Y - H:i:s') . "\n";
! 15: ?>
! 16: --EXPECT--
! 17: Wed Dec 13 2006 - 00:00:00
! 18: Wed Dec 13 2006 - 12:00:00
! 19: Wed Dec 13 2006 - 12:00:00
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>