Fixing MDL-6795 - Stats never runs. stats_monthly table gets very full - avoid double tz calculations in stats_getmidnight()

This commit is contained in:
martinlanghoff 2007-02-28 02:50:51 +00:00
parent 595fa6468b
commit b0ae3878a4

View File

@ -1100,7 +1100,7 @@ function stats_check_uptodate($courseid=0) {
// copied from usergetmidnight, but we ignore dst
function stats_getmidnight($date, $timezone=99) {
$timezone = get_user_timezone_offset($timezone);
$userdate = stats_getdate($date, $timezone);
$userdate = getdate($date);
return make_timestamp($userdate['year'], $userdate['mon'], $userdate['mday'], 0, 0, 0, $timezone,false ); // ignore dst for this.
}