File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / date / tests / bug62561.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:31:39 2013 UTC (11 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
Bug #62561 Unixtimestamp may take on local times DST flag (this test will only be valid during EDT)
--FILE--
<?php
$tz = new DateTimeZone('America/New_York');
$ts = new DateTime('@1341115200', $tz);
$int = new DateInterval('P1D');
$dayFromTs = new DateTime('@1341115200', new DateTimeZone('America/New_York'));
$dayFromTs->add($int);

echo 'ts: '.$ts->format('Y-m-d H:i:s')."\n";
echo 'day from ts: '.$dayFromTs->format('Y-m-d H:i:s')."\n";
?>
--EXPECT--
ts: 2012-07-01 04:00:00
day from ts: 2012-07-02 04:00:00

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