CRM-14148 cope with half hour timezones
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 5 Feb 2014 01:22:43 +0000 (14:22 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 5 Feb 2014 01:22:43 +0000 (14:22 +1300)
----------------------------------------
* CRM-14148: Timezones with partial hours cause core crash
  http://issues.civicrm.org/jira/browse/CRM-14148

CRM/Utils/System/Base.php

index 304b9bb8bd21d17daa4262f0e60faceac01cfffe..2e6e47dca913f39d45682dcf6df416307fe23d57 100644 (file)
@@ -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;