Browse Source

Fixed #22: issue with Daylight saving time and clocks adjusting by one hour backward

MOODLE_23_STABLE
Artem Andreev 12 years ago
parent
commit
ca6aaabfa0
  1. 3
      locallib.php

3
locallib.php

@ -215,7 +215,8 @@ class att_page_with_filter_controls {
public function init_start_end_date() { public function init_start_end_date() {
global $CFG; 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']; $mday = $date['mday'];
$wday = $date['wday'] - $CFG->calendar_startwday; $wday = $date['wday'] - $CFG->calendar_startwday;
if ($wday < 0) $wday += 7; if ($wday < 0) $wday += 7;

Loading…
Cancel
Save