mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
field comments.date becomes a datetime MySQL field type (instead of int)
git-svn-id: http://piwigo.org/svn/trunk@420 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -374,6 +374,12 @@ function format_date( $date, $type = 'us', $show_time = false )
|
||||
case 'unix' :
|
||||
$unixdate = $date;
|
||||
break;
|
||||
case 'mysql_datetime' :
|
||||
preg_match( '/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/',
|
||||
$date, $matches );
|
||||
$unixdate = mktime($matches[4],$matches[5],$matches[6],
|
||||
$matches[2],$matches[3],$matches[1]);
|
||||
break;
|
||||
}
|
||||
$formated_date = $lang['day'][date( "w", $unixdate )];
|
||||
$formated_date.= date( " j ", $unixdate );
|
||||
|
||||
Reference in New Issue
Block a user