Annotation of embedaddon/php/ext/date/tests/date_diff1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test for date_diff with timezone abbreviations.
! 3: --INI--
! 4: date.timezone=Europe/London
! 5: --FILE--
! 6: <?php
! 7: $start = new DateTime('2010-10-04 02:18:48 EDT');
! 8: $end = new DateTime('2010-11-06 18:38:28 EDT');
! 9: $int = $start->diff($end);
! 10: var_dump($start);
! 11: var_dump($end);
! 12: var_dump($int);
! 13: ?>
! 14: --EXPECT--
! 15: object(DateTime)#1 (3) {
! 16: ["date"]=>
! 17: string(19) "2010-10-04 02:18:48"
! 18: ["timezone_type"]=>
! 19: int(2)
! 20: ["timezone"]=>
! 21: string(3) "EDT"
! 22: }
! 23: object(DateTime)#2 (3) {
! 24: ["date"]=>
! 25: string(19) "2010-11-06 18:38:28"
! 26: ["timezone_type"]=>
! 27: int(2)
! 28: ["timezone"]=>
! 29: string(3) "EDT"
! 30: }
! 31: object(DateInterval)#3 (8) {
! 32: ["y"]=>
! 33: int(0)
! 34: ["m"]=>
! 35: int(1)
! 36: ["d"]=>
! 37: int(2)
! 38: ["h"]=>
! 39: int(16)
! 40: ["i"]=>
! 41: int(19)
! 42: ["s"]=>
! 43: int(40)
! 44: ["invert"]=>
! 45: int(0)
! 46: ["days"]=>
! 47: int(33)
! 48: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>