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:
z0rglub
2004-05-20 21:22:44 +00:00
parent 396d68275d
commit 8db124da81
5 changed files with 173 additions and 157 deletions
+6
View File
@@ -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 );