MDL-49897 calendar: mktime => usergetmidnight
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 9 Mar 2016 05:18:09 +0000 (13:18 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 9 Mar 2016 05:18:09 +0000 (13:18 +0800)
calendar/view.php

index 9e867a7..7902359 100644 (file)
@@ -68,10 +68,10 @@ if (!empty($day) && !empty($mon) && !empty($year)) {
     if (checkdate($mon, $day, $year)) {
         $time = make_timestamp($year, $mon, $day);
     } else {
-        $time = mktime(0, 0, 0);
+        $time = usergetmidnight(time());
     }
 } else if (empty($time)) {
-    $time = mktime(0, 0, 0);
+    $time = usergetmidnight(time());
 }
 
 $url->param('time', $time);