derick Tue, 06 Dec 2011 06:13:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=320480
Log:
Make tests similar to the ones in 5.4 and trunk.
Changed paths:
U php/php-src/branches/PHP_5_3/ext/date/tests/date.phpt
U php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt
U php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt
Modified: php/php-src/branches/PHP_5_3/ext/date/tests/date.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/date.phpt 2011-12-06
06:07:41 UTC (rev 320479)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/date.phpt 2011-12-06
06:13:41 UTC (rev 320480)
@@ -3,22 +3,14 @@
--FILE--
<?php
$tmp = "cr";
-if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
- date_default_timezone_set('GMT0');
-} else {
- putenv ("TZ=GMT0");
-}
+date_default_timezone_set('UTC');
-
for($a = 0;$a < strlen($tmp); $a++){
echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";
}
-if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
- date_default_timezone_set("MET");
-} else {
- putenv ("TZ=MET");
-}
+date_default_timezone_set("MET");
+
for($a = 0;$a < strlen($tmp); $a++){
echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";
}
Modified: php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt 2011-12-06
06:07:41 UTC (rev 320479)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt 2011-12-06
06:13:41 UTC (rev 320480)
@@ -5,13 +5,13 @@
--FILE--
<?php
$timezones = array(
- 'GMT0',
+ 'UTC',
'Europe/London'
);
foreach($timezones as $timezone)
{
- putenv('TZ='.$timezone);
+ date_default_timezone_set($timezone);
/* status of daylight saving time unknown */
var_dump(mktime(0, 0, 0, 1, 1, 2002));
Modified:
php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt
2011-12-06 06:07:41 UTC (rev 320479)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt
2011-12-06 06:13:41 UTC (rev 320480)
@@ -4,19 +4,10 @@
date.timezone=GMT
--FILE--
<?php
- putenv('TZ=Europe/Oslo');
- if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
- date_default_timezone_set('Europe/Oslo');
- } else {
- putenv('TZ=Europe/Oslo');
- }
+ date_default_timezone_set('Europe/Oslo');
echo strtotime("2005-06-18 22:15:44"), "\n";
- if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
- date_default_timezone_set('Europe/London');
- } else {
- putenv('TZ=Europe/London');
- }
+ date_default_timezone_set('Europe/London');
echo strtotime("2005-06-18 22:15:44"), "\n";
date_default_timezone_set('Europe/Oslo');
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php