[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Time stamp on jpg

nicknewton

10/23/2007 2:42:00 PM

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

3 Answers

Citizen Snips

10/23/2007 2:55:00 PM

0

nick wrote:
> 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
--
Posted via http://www.ruby-....

Ben Bleything

10/23/2007 3:48:00 PM

0

On Tue, Oct 23, 2007, Citizen Snips wrote:
> nick wrote:
> > 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
>
> 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

nicknewton

10/23/2007 3:55:00 PM

0

On Oct 23, 9:54 am, Citizen Snips <kungfu.g...@internode.on.net>
wrote:
> nick wrote:
> > 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
> --
> Posted viahttp://www.ruby-....

thanks