mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Update wording of warning message, and reinstate 'UTC' fallback for ctor
This commit is contained in:
parent
b3c6b540a1
commit
e0d21297fe
@ -519,7 +519,7 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
|
||||
}
|
||||
|
||||
if (!timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid date.timezone value '%s'", DATEG(default_timezone));
|
||||
php_error_docref(NULL, E_WARNING, "UTC was used as timezone, because the date.timezone value '%s' is invalid", DATEG(default_timezone));
|
||||
return "UTC";
|
||||
}
|
||||
|
||||
|
@ -11,4 +11,4 @@ try {
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: ini_set(): Invalid date.timezone value 'dummy' in %sbug73239.php on line %d
|
||||
DateTime::__construct(): Invalid date.timezone value 'dummy', we selected the timezone 'UTC' for now.
|
||||
DateTime::__construct(): UTC was used as timezone, because the date.timezone value 'dummy' is invalid
|
||||
|
@ -7,5 +7,5 @@ date.timezone=Incorrect/Zone
|
||||
echo date_default_timezone_get(), "\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: date_default_timezone_get(): Invalid date.timezone value 'Incorrect/Zone', we selected the timezone 'UTC' for now. in %sdate_default_timezone_get-4.php on line %d
|
||||
Warning: date_default_timezone_get(): UTC was used as timezone, because the date.timezone value 'Incorrect/Zone' is invalid in %sdate_default_timezone_get-4.php on line %d
|
||||
UTC
|
||||
|
@ -15,4 +15,4 @@ try {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
IntlDateFormatter::__construct(): Invalid date.timezone value 'Mars/Utopia_Planitia', we selected the timezone 'UTC' for now.
|
||||
IntlDateFormatter::__construct(): UTC was used as timezone, because the date.timezone value 'Mars/Utopia_Planitia' is invalid
|
||||
|
Loading…
Reference in New Issue
Block a user