daylight saving fix for today from Christian

This commit is contained in:
Ralf Becker 2006-10-29 12:52:52 +00:00
parent 7c70498b4c
commit 3aefcc40c9

View File

@ -798,6 +798,12 @@ class uiviews extends uical
$day_start = $this->bo->date2ts((string)$day_ymd); $day_start = $this->bo->date2ts((string)$day_ymd);
// if daylight saving is switched on or off, correct $day_start
// gives correct times after 2am, times between 0am and 2am are wrong
if(($daylight_diff = $day_start + 12*HOUR_s - ($this->bo->date2ts($day_ymd."T120000"))))
{
$day_start -= $daylight_diff;
}
// sorting the event into columns with none-overlapping events, the events are already sorted by start-time // sorting the event into columns with none-overlapping events, the events are already sorted by start-time
$eventCols = $col_ends = array(); $eventCols = $col_ends = array();
foreach($events as $event) foreach($events as $event)