mirror of
https://github.com/php/php-src.git
synced 2024-12-03 06:44:07 +08:00
- skip on win, runtime TZ via putenv is not supported with ext/date
This commit is contained in:
parent
14300717d8
commit
4fffbad733
@ -5,9 +5,18 @@ 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');
|
||||
}
|
||||
echo strtotime("2005-06-18 22:15:44"), "\n";
|
||||
|
||||
putenv('TZ=Europe/London');
|
||||
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
|
||||
date_default_timezone_set('Europe/London');
|
||||
} else {
|
||||
putenv('TZ=Europe/London');
|
||||
}
|
||||
echo strtotime("2005-06-18 22:15:44"), "\n";
|
||||
|
||||
date_default_timezone_set('Europe/Oslo');
|
||||
|
Loading…
Reference in New Issue
Block a user