Annotation of embedaddon/php/ext/date/tests/bug62561.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #62561 Unixtimestamp may take on local times DST flag (this test will only be valid during EDT)
                      3: --FILE--
                      4: <?php
                      5: $tz = new DateTimeZone('America/New_York');
                      6: $ts = new DateTime('@1341115200', $tz);
                      7: $int = new DateInterval('P1D');
                      8: $dayFromTs = new DateTime('@1341115200', new DateTimeZone('America/New_York'));
                      9: $dayFromTs->add($int);
                     10: 
                     11: echo 'ts: '.$ts->format('Y-m-d H:i:s')."\n";
                     12: echo 'day from ts: '.$dayFromTs->format('Y-m-d H:i:s')."\n";
                     13: ?>
                     14: --EXPECT--
                     15: ts: 2012-07-01 04:00:00
                     16: day from ts: 2012-07-02 04:00:00

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>