From 81eefdd60f3290c38ec42c4183ccbde58915adfd Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 6 Jul 2015 19:36:29 +0000 Subject: [PATCH] fallback to UTC if no timezone setting is available --- lam/lib/account.inc | 3 +++ 1 file changed, 3 insertions(+) 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); }