Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Little Problem with EXIF Date/Time  (Read 5268 times)

0 Members and 1 Guest are viewing this topic.

Ghettomaster

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Little Problem with EXIF Date/Time
« on: February 04, 2005, 07:33:13 pm »

Hello,

i have a little problem with the EXIF Date/Time output. It looks like: "2004:12:15 22:14:28".
How can i change the output format? Is this even possible? I've searched the forums, looked into the documentation and the FAQ's, but i can't find anything about this....

CU
Ghettomaster
Logged

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: Little Problem with EXIF Date/Time
« Reply #1 on: February 05, 2005, 12:08:52 pm »

Open exifReader.inc.php from include folder and search for
Code: [Select]
$retArr["FileDateTime"] = date("d-M-Y H:i:s",$imgInfo["FileDateTime"]);

replace d-M-Y H:i:s with the date format of your choice. Remember it should be a valid PHP date format.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

Ghettomaster

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Little Problem with EXIF Date/Time
« Reply #2 on: February 05, 2005, 01:14:51 pm »

Change the Date/Time Format in this file has no effect to the output, i've tryed this before I asked here.

And yes i have updated the EXIF informations from the File.

Btw. Excuse my bad english.


In german:
Falls jemand hier deutsch spricht, in Englisch kann ich es leider nicht so gut erklären.
Änderungen in der oben genannten Datei haben weder einen Effekt auf das Format in dem die EXIF Informationen in der Datenbank gespeichert werden, noch einen Effekt auf die Ausgabe. Das bedeutet das Datumsformat liegt in oben genannter Form so in der Datenbank und wird unverändert ausgegeben. Nun weiß ich natürlich nicht wie das in Coppermine gelöst ist, ob die Formatierung des Datums beim auslesen aus der Datei erfolgt, oder erst wenn das Datum in der Galerie ausgegeben wird.


CU
Ghettomaster
Logged

elrol

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Little Problem with EXIF Date/Time
« Reply #3 on: March 28, 2005, 06:52:56 pm »

change the code of displayimage.php lines 620 - 627 to the following

Code: [Select]
if (substr($exif['DateTaken'], 11, 2) >12)
{ $hour = substr($exif['DateTaken'], 11, 2) - 12 ;
$ap = "pm" ;}
else { $hour = substr($exif['DateTaken'], 11, 2)  ;
$ap = "am" ; }


        if (isset($exif['DateTaken'])) $info[$lang_picinfo['Date taken']] = substr($exif['DateTaken'], 5, 2) . "." . substr($exif['DateTaken'], 8, 2) . "." . substr($exif['DateTaken'], 0, 4) . " at " . $hour . ":" . substr($exif['DateTaken'], 14, 2) . " " . $ap ; //$exif['DateTaken'];

it worked for me and i hope it works for you also.. i was having the same prob and noone could help me either, so i found a fix myself..
Logged

tutone

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
Re: Little Problem with EXIF Date/Time
« Reply #4 on: May 09, 2005, 07:56:44 am »

Great hack!  How do I make the code spell out the month... so that it matches the date added format?

thanks
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.