aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-05-20 21:22:44 +0000
committerz0rglub <z0rglub@piwigo.org>2004-05-20 21:22:44 +0000
commit8db124da81b8f90d6622ae8086ff57010a996355 (patch)
tree4b0b5eceb204eea75d017a2fd895bd752915b691 /include/functions.inc.php
parent396d68275d6fe79ffdf07a378d7e46ebe60bcc7b (diff)
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
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php6
1 files changed, 6 insertions, 0 deletions
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 );