From 1dc5c7ccfdba5f6177eeb7b9a5d10e9135ffabe8 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 3 Feb 2011 08:18:38 +0000 Subject: bug 270 fixed: (yes "270", submitted in 2006), time (hour:minute:second) added in the date_creation field and in the synchronization from EXIF metadata. git-svn-id: http://piwigo.org/svn/trunk@9073 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions_metadata.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'admin') diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index 953c80b7d..1bbd87e8f 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -89,7 +89,11 @@ function get_sync_exif_data($file) { if (in_array($pwg_key, array('date_creation', 'date_available'))) { - if (preg_match('/^(\d{4}).(\d{2}).(\d{2})/', $value, $matches)) + if (preg_match('/^(\d{4}).(\d{2}).(\d{2}) (\d{2}).(\d{2}).(\d{2})/', $value, $matches)) + { + $exif[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3].' '.$matches[4].':'.$matches[5].':'.$matches[6]; + } + elseif (preg_match('/^(\d{4}).(\d{2}).(\d{2})/', $value, $matches)) { $exif[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3]; } -- cgit v1.2.3