fallback to UTC if no timezone setting is available
This commit is contained in:
parent
bf6872fefa
commit
81eefdd60f
|
@ -1276,6 +1276,9 @@ function getTimeZoneOffsetHours() {
|
|||
* @return DateTimeZone time zone
|
||||
*/
|
||||
function getTimeZone() {
|
||||
if (empty($_SESSION['config'])) {
|
||||
return new DateTimeZone('UTC');
|
||||
}
|
||||
$timeZone = $_SESSION['config']->getTimeZone();
|
||||
return new DateTimeZone($timeZone);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue