Annotation of embedaddon/php/ext/date/tests/014.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: timezone_offset_get() tests
! 3: --FILE--
! 4: <?php
! 5: date_default_timezone_set('UTC');
! 6:
! 7: $dto = date_create("2006-12-12");
! 8: var_dump($dto);
! 9:
! 10: $dtz = date_timezone_get($dto);
! 11: var_dump($dtz);
! 12:
! 13: var_dump(timezone_offset_get());
! 14: var_dump(timezone_offset_get($dtz, $dto));
! 15: var_dump(timezone_offset_get($dto, $dtz));
! 16:
! 17: echo "Done\n";
! 18:
! 19: ?>
! 20: --EXPECTF--
! 21: object(DateTime)#%d (3) {
! 22: ["date"]=>
! 23: string(19) "2006-12-12 00:00:00"
! 24: ["timezone_type"]=>
! 25: int(3)
! 26: ["timezone"]=>
! 27: string(3) "UTC"
! 28: }
! 29: object(DateTimeZone)#%d (0) {
! 30: }
! 31:
! 32: Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on line %d
! 33: bool(false)
! 34: int(0)
! 35:
! 36: Warning: timezone_offset_get() expects parameter 1 to be DateTimeZone, object given in %s on line %d
! 37: bool(false)
! 38: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>