mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
- fix test on win, does not use putenv to set the TZ but date_default_timezone_set (should be the case on all platforms actually...)
This commit is contained in:
parent
40217d0417
commit
d1b156f1be
@ -3,14 +3,22 @@ date() function
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$tmp = "cr";
|
$tmp = "cr";
|
||||||
putenv ("TZ=GMT0");
|
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
|
||||||
|
date_default_timezone_set('GMT0');
|
||||||
|
} else {
|
||||||
|
putenv ("TZ=GMT0");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for($a = 0;$a < strlen($tmp); $a++){
|
for($a = 0;$a < strlen($tmp); $a++){
|
||||||
echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";
|
echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
putenv ("TZ=MET");
|
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
|
||||||
|
date_default_timezone_set("MET");
|
||||||
|
} else {
|
||||||
|
putenv ("TZ=MET");
|
||||||
|
}
|
||||||
for($a = 0;$a < strlen($tmp); $a++){
|
for($a = 0;$a < strlen($tmp); $a++){
|
||||||
echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";
|
echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user