There is an error in both the function round_t_down
and rount_t_up in the file web/functions.inc.
Basicly the function involves any time that
$resolution is an odd amount. The issue is if the
start of the day, if that time is not an invterval of
the $resolution, starting from Jan 1, 1970 (start of
unix time, i think).
To fix this, you add an extra paramater to these calls
which accepts $am7, the start of the day time.
The new function are as follows:
function round_t_down($t, $resolution, $am7)
return (int)$t - (int)abs(((int)$t-(int)$am7)
function round_t_up2($t, $resolution, $am7)
if (($t-$am7) % $resolution != 0)
return $t + $resolution - abs(((int)$t-(int)
$am7) % $resolution);
These probably could be cleaned up a little (don't
know if you need all the casting, but it works.