Annotation of embedaddon/php/ext/date/tests/bug49585.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #49585 (date_format buffer not long enough for >4 digit years)
! 3: --FILE--
! 4: <?php
! 5: date_default_timezone_set('UTC');
! 6:
! 7: $date = new DateTime('-1500-01-01');
! 8: var_dump($date->format('r'));
! 9:
! 10: $date->setDate(-2147483648, 1, 1);
! 11: var_dump($date->format('r'));
! 12: var_dump($date->format('c'));
! 13: --EXPECT--
! 14: string(32) "Sat, 01 Jan -1500 00:00:00 +0000"
! 15: string(42) "Unknown, 01 Jan -2147483648 00:00:00 +0000"
! 16: string(32) "-2147483648-01-01T00:00:00+00:00"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>