summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 35c2df4c7..1e84e2dfb 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -790,6 +790,7 @@ function format_date($date, $format=NULL, $convert=true)
// define date format depending on current time
if (!$format) {
+ $now = time();
$now_date = getdate($now);
$today_limit = mktime(0, 0, 0, $now_date['mon'], $now_date['mday'], $now_date['year']);
$week_limit = mktime(0, 0, 0, $now_date['mon'], $now_date['mday']-6, $now_date['year']);