Time stamp on jpg

N

nick

I am trying to find the time that a jpg was created. I am using the
File.atime(file) code. My problem is it will tell me the date that it
was created but the time is 00:00:00, I was wanting to know if anyone
else has ever came across this problem. I am using ruby 1.86
Thanks
Nick
 
C

Citizen Snips

nick said:
I am trying to find the time that a jpg was created. I am using the
File.atime(file) code. My problem is it will tell me the date that it
was created but the time is 00:00:00, I was wanting to know if anyone
else has ever came across this problem. I am using ruby 1.86
Thanks
Nick



try mtime
atime is the time last accessed, not created
 
B

Ben Bleything

try mtime
atime is the time last accessed, not created

Depending on where the JPEG came from, you might try extracting the EXIF
data too. If the image is coming from a camera, it's very likely to
have a timestamp for when it was captured.

Search Rubyforge for 'exif', there are a number of projects.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top