diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 4a11f76f..022b4140 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -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); }