Sort by date picture taken

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am displaying a bunch of pictures on my website and I would like to
sort them by a Date Picture Taken key.  I have looked into exif data
and I wrote a little code that just prints all the keys and their
$file = "MyPicture.jpg";
$exif = read_exif_data ("$file");
  echo "$k: $v<br>\n";

For date picture taken, All I get is:

FileName: MyPicture.jpg
FileDateTime: 1180959961
ExifVersion: 1220
CompressedBitsPerPixel: 892484151/3289658

nothing as you can see.  Here is the info from phpinfo about my exif
EXIF Support     enabled
EXIF Version     1.4 $Id: exif.c,v 2006/04/10 18:23:24 helly
Exp $
Supported EXIF Version     0220
Supported filetypes     JPEG,TIFF

When I download the jpg, I can view/sort by the date picture taken
using Windows Explorer.

Does anyone know why I am not seeing the DateTimeOriginal information?

If anyone knows a better way to sort by Date Picture Taken On, I'd
love to hear it.  Windows can do it so it must be in there somewhere.

Re: Sort by date picture taken

Not sure, explorer may be falling back to a different value in the
absence of DateTimeOriginal. Btw, this tool can set the
DateTimeOriginal field:

Quoted text here. Click to load it

Site Timeline