aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/functions.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 860811c3c..915a1b6b6 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -392,7 +392,9 @@ function format_date($date, $type = 'us', $show_time = false)
// before 1970, Microsoft Windows can't mktime
if ($year >= 1970 or substr(PHP_OS, 0, 3) != 'WIN')
{
- $formated_date.= $lang['day'][date('w', mktime(0,0,0,$month,$day,$year))];
+ // we ask midday because Windows think it's prior to midnight with a
+ // zero and refuse to work
+ $formated_date.= $lang['day'][date('w', mktime(12,0,0,$month,$day,$year))];
}
$formated_date.= ' '.$day;
$formated_date.= ' '.$lang['month'][(int)$month];