cvs: php-src /ext/date/tests bug45529.phpt

From: Date: Wed, 16 Jul 2008 15:42:13 +0000
Subject: cvs: php-src /ext/date/tests bug45529.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-51168@lists.php.net to get a copy of this message
derick Wed Jul 16 15:42:13 2008 UTC Modified files: /php-src/ext/date/tests bug45529.phpt Log: - Added missing test-file. http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug45529.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/date/tests/bug45529.phpt diff -u /dev/null php-src/ext/date/tests/bug45529.phpt:1.2 --- /dev/null Wed Jul 16 15:42:13 2008 +++ php-src/ext/date/tests/bug45529.phpt Wed Jul 16 15:42:13 2008 @@ -0,0 +1,20 @@ +--TEST-- +Bug #45529 (UTC not properly recognised as timezone identifier while parsing) +--FILE-- +<?php +$tz1 = new DateTimeZone('UTC'); +$tz2 = date_create('UTC')->getTimeZone(); +echo $tz1->getName(), PHP_EOL; +echo $tz2->getName(), PHP_EOL; +$d = new DateTime('2008-01-01 12:00:00+0200'); +$d->setTimeZone($tz1); +echo $d->format(DATE_ISO8601), PHP_EOL; +$d = new DateTime('2008-01-01 12:00:00+0200'); +$d->setTimeZone($tz2); +echo $d->format(DATE_ISO8601), PHP_EOL; +?> +--EXPECT-- +UTC +UTC +2008-01-01T10:00:00+0000 +2008-01-01T10:00:00+0000

« previous php.cvs (#51168) next »