mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-05-10 10:25:53 +03:00
bug on Windows for date 1970-01-01 : Windows refuses to work with 1970-01-01
00:00:00, "he" thinks it's prior to midnight... Let's force midday ! git-svn-id: http://piwigo.org/svn/trunk@618 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
fd9ae1ae8f
commit
6de8a6f8c1
1 changed files with 3 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue