Annotation of embedaddon/php/ext/date/tests/bug52062.phpt, revision 1.1.1.1
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: ?>
7: --INI--
8: date.timezone=UTC
9: --FILE--
10: <?php
11: $d = new DateTime('@100000000000');
12: var_dump($d->format('Y-m-d H:i:s U'));
13: var_dump($d->getTimestamp());
14:
15: $d->setTimestamp(100000000000);
16: var_dump($d->format('Y-m-d H:i:s U'));
17: var_dump($d->getTimestamp());
18:
19: $i = new DateInterval('PT100000000000S');
20: var_dump($i->format('%s'));
21: ?>
22: --EXPECT--
23: string(32) "5138-11-16 09:46:40 100000000000"
24: int(100000000000)
25: string(32) "5138-11-16 09:46:40 100000000000"
26: int(100000000000)
27: string(12) "100000000000"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>