From 030113f03915ac19f483bcd8a2143e2377567bb4 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Mon, 24 Aug 2015 12:09:06 +1200 Subject: [PATCH] CRM-17072 fix timezone handling for UTF dates --- CRM/Utils/System/Base.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index 866aeeafed..0e076d3126 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -548,6 +548,10 @@ abstract class CRM_Utils_System_Base { public function getTimeZoneOffset() { $timezone = $this->getTimeZoneString(); if ($timezone) { + if ($timezone == 'UTC') { + // CRM-17072 Let's short-circuit all the zero handling & return it here! + return '+00:00'; + } $tzObj = new DateTimeZone($timezone); $dateTime = new DateTime("now", $tzObj); $tz = $tzObj->getOffset($dateTime); -- 2.25.1