mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
[feature/new-tz-handling] Fall back to UTC, if the timezone is invalid
This should avoid problems, when the board files are updated but database isn't. PHPBB3-9558
This commit is contained in:
@@ -916,7 +916,14 @@ class acp_board
|
||||
|
||||
// Let the format_date function operate with the acp values
|
||||
$old_tz = $user->timezone;
|
||||
$user->timezone = new DateTimeZone($config['board_timezone']);
|
||||
try
|
||||
{
|
||||
$user->timezone = new DateTimeZone($config['board_timezone']);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
// If the board timezone is invalid, we just use the users timezone.
|
||||
}
|
||||
|
||||
$dateformat_options = '';
|
||||
|
||||
|
Reference in New Issue
Block a user