aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-11-09 21:44:44 +0000
committerrub <rub@piwigo.org>2008-11-09 21:44:44 +0000
commit2a804c8b21820470fa334a9782878768a1095345 (patch)
tree7a518a8425e94fedc614ec57f753ed35e87cd52f /include/functions.inc.php
parent1ddabfb6812688ae02f3dc58c7444d100462b98c (diff)
Resolved issue 0000900: format_date function doesn't work when time is omitted with 'mysql_datetime' type
Continue correction of grum git-svn-id: http://piwigo.org/svn/trunk@2856 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index efdc79780..093f207e9 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -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