From 21b06c58cb887c880d95a2cc98eefdc588e08a7c Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 10 May 2010 15:43:54 +0200 Subject: [PATCH] Fix listing events if using UTC for backend storage. --- kronolith/lib/Driver/Sql.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kronolith/lib/Driver/Sql.php b/kronolith/lib/Driver/Sql.php index 42929ec93..84e725fb2 100644 --- a/kronolith/lib/Driver/Sql.php +++ b/kronolith/lib/Driver/Sql.php @@ -297,6 +297,16 @@ class Kronolith_Driver_Sql extends Kronolith_Driver $endInterval = null, $conditions = '', $vals = array()) { + if ($this->getParam('utc')) { + if (!is_null($startInterval)) { + $startInterval = clone $startInterval; + $startInterval->setTimezone('UTC'); + } + if (!is_null($endInterval)) { + $endInterval = clone $endInterval; + $endInterval->setTimezone('UTC'); + } + } $q = 'SELECT event_id, event_uid, event_description, event_location,' . ' event_private, event_status, event_attendees,' . ' event_title, event_recurcount, event_url,' . -- 2.11.0