View Full Version : EXIF date format?
cnate
04-15-2005, 08:23 PM
Sorry if this is mentioned somewhere and I just didnt see it...
I'm trying to get a way to change the exif capture date/time format (year:month:day hour:min:sec) to something different, like we are able to do with the dates for comments/posts in the admin section (or maybe even have it controlled by the date format in the admin section aswell). thanks in advance! :)
raminia
04-15-2005, 09:36 PM
you need something strange. you should parse the EXIF date string. no other way IMO.
cnate
04-15-2005, 09:55 PM
you need something strange. you should parse the EXIF date string. no other way IMO.
Any suggestions on how i would go about doing that?
I'm not too good with php so of course the method I was trying just wouldnt work (explode the exif date per :, then use mktime to get a timestamp, then date to get a date of my liking).
:(
raminia
04-15-2005, 10:04 PM
yeah something alike. I'm too sleepy to make good suggestions.
cnate
04-15-2005, 11:51 PM
I got it to work now...
Just added these lines:
$xdate = explode(':', str_replace(" ",":",$capture_date));
$capture_date = date($cfgrow['dateformat'], mktime($xdate[3],$xdate[4],$xdate[5],$xdate[1],$xd ate[2],$xdate[0]));
right under $capture_date = $exif_result['SubIFD']['DateTimeOriginal']; // Date and Time
in index.php.
Now all my image capture dates look like the rest of the dates on my site :)
anela
05-27-2005, 04:51 PM
I got it to work now...
Hey thanks for posting that, it's exactly what I was looking for. :-)
parappa
01-03-2007, 07:19 PM
I got it to work now...
Just added these lines:
$xdate = explode(':', str_replace(" ",":",$capture_date));
$capture_date = date($cfgrow['dateformat'], mktime($xdate[3],$xdate[4],$xdate[5],$xdate[1],$xdate[2],$xdate[0]));
right under $capture_date = $exif_result['SubIFD']['DateTimeOriginal']; // Date and Time
in index.php.
Now all my image capture dates look like the rest of the dates on my site :)
That's exactly what I needed ! Thank you ! :)
owen-b
12-23-2007, 12:42 PM
Hiya,
I can't find the place you're supposed to enter this text at all in my index.php. I'm running 1.6 and looking in the index.php file that resides in the root folder.
Dennis
12-24-2007, 09:52 AM
owen, do a search around the forum. I have posted a solution a few weeks ago.
owen-b
12-24-2007, 10:10 AM
Do you mean this thread:
http://www.pixelpost.org/forum/showthread.php?t=7485
Because that doesn't really handle what I'm talking about in a simple way, if so, and I'm pretty sure it's not the solution I'm looking for that other people have used...
Why can't I find the text mentioned above on the index.php? Has it changed with 1.6?
austriaka
12-24-2007, 12:11 PM
in v1.6 it is line 77 of includes/functions_exif.php:
$capture_date = $exif_result['DateTimeOriginalSubIFD']; // Date and Time
in v1.7 this is fixed and will show the EXIF date and time in the date format you set in Admin options.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.