fix for bug reported by audiohazard-at-gmx.de on the devel list

This commit is contained in:
Ralf Becker 2008-02-07 04:35:12 +00:00
parent ea2c699f5c
commit e7a3f37f06

View File

@ -1848,7 +1848,9 @@ class uiviews extends uical
}
else
{
$day_percentage = ($time_of_day-$this->wd_start) / ($this->wd_end - $this->wd_start); // between 0 and 1
$wd_lenght = $this->wd_end - $this->wd_start;
if ($wd_lenght <= 0) $wd_lenght = 24*60;
$day_percentage = ($time_of_day-$this->wd_start) / $wd_lenght; // between 0 and 1
}
$days = ($end - $start) / DAY_s;
$percent += $day_percentage / $days;