From 8db124da81b8f90d6622ae8086ff57010a996355 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Thu, 20 May 2004 21:22:44 +0000 Subject: 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 --- include/functions.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/functions.inc.php') diff --git a/include/functions.inc.php b/include/functions.inc.php index 4337cf81a..01f13f78d 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -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 ); -- cgit v1.2.3