Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Time stamp on jpg

Reply
Thread Tools

Time stamp on jpg

 
 
nick
Guest
Posts: n/a
 
      10-23-2007
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

 
Reply With Quote
 
 
 
 
Citizen Snips
Guest
Posts: n/a
 
      10-23-2007
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-forum.com/.

 
Reply With Quote
 
 
 
 
Ben Bleything
Guest
Posts: n/a
 
      10-23-2007
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

 
Reply With Quote
 
nick
Guest
Posts: n/a
 
      10-23-2007
On Oct 23, 9:54 am, Citizen Snips <(E-Mail Removed)>
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-forum.com/.


thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time stamp problem Zean Smith ASP .Net 0 02-07-2006 03:19 PM
Saving time stamp for replied to email? Keith Firefox 4 01-17-2006 07:03 PM
Modifying a file's time stamp ladygrinningsoul Perl 1 12-06-2004 02:36 AM
Can Windows file time stamp be changed to shooting time? Gustav Digital Photography 8 07-31-2004 10:11 PM
Date/Time stamp in SQL =?Utf-8?B?QmVydA==?= ASP .Net 2 01-30-2004 04:47 PM



Advertisments