From ca6aaabfa0212f7b67e52fc1e7fb8921291c0b9a Mon Sep 17 00:00:00 2001 From: Artem Andreev Date: Fri, 12 Oct 2012 17:50:13 +0400 Subject: [PATCH] Fixed #22: issue with Daylight saving time and clocks adjusting by one hour backward --- locallib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locallib.php b/locallib.php index 522752c..346e569 100644 --- a/locallib.php +++ b/locallib.php @@ -215,7 +215,8 @@ class att_page_with_filter_controls { public function init_start_end_date() { global $CFG; - $date = usergetdate($this->curdate); + // HOURSECS solves issue for weeks view with Daylight saving time and clocks adjusting by one hour backward + $date = usergetdate($this->curdate + HOURSECS); $mday = $date['mday']; $wday = $date['wday'] - $CFG->calendar_startwday; if ($wday < 0) $wday += 7;