mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
Resolved issue 0000900: format_date function doesn't work when time is omitted with 'mysql_datetime' type
Continue correction of grum merge -c2856 from trunk to branch 2.0 The exact copy of commit log in 2856. git-svn-id: http://piwigo.org/svn/branches/2.0@2857 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -601,6 +601,14 @@ function format_date($date, $type = 'us', $show_time = false)
|
||||
array($out[1],$out[2],$out[3],$out[4],$out[5],$out[6]);
|
||||
break;
|
||||
}
|
||||
case 'mysql_date' :
|
||||
{
|
||||
preg_match('/^(\d{4})-(\d{2})-(\d{2})$/',
|
||||
$date, $out);
|
||||
list($year,$month,$day) =
|
||||
array($out[1],$out[2],$out[3]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$formated_date = '';
|
||||
// before 1970, Microsoft Windows can't mktime
|
||||
|
||||
Reference in New Issue
Block a user