From: Eileen McNaughton Date: Wed, 5 Feb 2014 01:22:43 +0000 (+1300) Subject: CRM-14148 cope with half hour timezones X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b1d339fc63ff8e5fae67d51ffdcc7266a3c2287b;p=civicrm-core.git CRM-14148 cope with half hour timezones ---------------------------------------- * CRM-14148: Timezones with partial hours cause core crash http://issues.civicrm.org/jira/browse/CRM-14148 --- diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index 304b9bb8bd..2e6e47dca9 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -201,7 +201,7 @@ abstract class CRM_Utils_System_Base { return false; } - $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, ($tz/60)%60 ); + $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, abs(($tz/60)%60)); if($timeZoneOffset > 0){ $timeZoneOffset = '+' . $timeZoneOffset;