mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/new-tz-handling] Add previous selected value to validation if valid
We also add the selected timezone if we can create an object with it. DateTimeZone::listIdentifiers seems to not add all identifiers to the list, because some are only kept for backward compatible reasons. If the user has a deprecated value, we add it here, so it can still be kept. Once the user changed his value, there is no way back to deprecated values. PHPBB3-9558
This commit is contained in:
@@ -1420,7 +1420,7 @@ function validate_language_iso_name($lang_iso)
|
||||
*/
|
||||
function phpbb_validate_timezone($timezone)
|
||||
{
|
||||
return (in_array($timezone, DateTimeZone::listIdentifiers())) ? false : 'TIMEZONE_INVALID';
|
||||
return (in_array($timezone, phpbb_get_timezone_identifiers($timezone))) ? false : 'TIMEZONE_INVALID';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user