Annotation of embedaddon/php/ext/date/tests/bug52062.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #52062 (large timestamps with DateTime::getTimestamp and DateTime::setTimestamp) (32 bit)
3: --SKIPIF--
4: <?php
5: if (PHP_INT_SIZE == 8) die('skip 32-bit only');
6: ?>
1.1.1.2 ! misho 7: --XFAIL--
! 8: Waiting for resolution of the 32-bit case.
1.1 misho 9: --INI--
10: date.timezone=UTC
11: --FILE--
12: <?php
13: $d = new DateTime('@100000000000');
14: var_dump($d->format('Y-m-d H:i:s U'));
15: var_dump($d->getTimestamp());
16:
17: $d->setTimestamp(100000000000);
18: var_dump($d->format('Y-m-d H:i:s U'));
19: var_dump($d->getTimestamp());
20:
21: $i = new DateInterval('PT100000000000S');
22: var_dump($i->format('%s'));
23: ?>
24: --EXPECT--
25: string(32) "5138-11-16 09:46:40 100000000000"
26: int(100000000000)
27: string(32) "5138-11-16 09:46:40 100000000000"
28: int(100000000000)
29: string(12) "100000000000"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>