From 83d17bf7962bd5947d8530c73c05892cf3a3b071 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 16 Feb 2014 12:21:18 +1300 Subject: [PATCH] CRM-14148 fix half hour timezones for d7 Fix on previous patch on d6 version --- CRM/Utils/System/Drupal.php | 2 +- CRM/Utils/System/Drupal6.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index 6e41423360..5f757822c1 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -982,7 +982,7 @@ AND u.status = 1 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; diff --git a/CRM/Utils/System/Drupal6.php b/CRM/Utils/System/Drupal6.php index 54bc32d49e..e16e61bbde 100644 --- a/CRM/Utils/System/Drupal6.php +++ b/CRM/Utils/System/Drupal6.php @@ -956,7 +956,7 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { return false; } $hour = $user->timezone / 3600; - $timeZoneOffset = sprintf("%02d:%02d", $timezone / 3600, ($timezone/60)%60 ); + $timeZoneOffset = sprintf("%02d:%02d", $timezone / 3600, abs(($timeZoneOffset/60)%60)); if($timeZoneOffset > 0){ $timeZoneOffset = '+' . $timeZoneOffset; } -- 2.25.1