Time stamp on jpg

Discussion in 'Ruby' started by nick, Oct 23, 2007.

  1. nick

    nick Guest

    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
     
    nick, Oct 23, 2007
    #1
    1. Advertisements

  2. 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/.
     
    Citizen Snips, Oct 23, 2007
    #2
    1. Advertisements

  3. 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
     
    Ben Bleything, Oct 23, 2007
    #3
  4. nick

    nick Guest

    On Oct 23, 9:54 am, 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
    > > Thanks
    > > Nick

    >
    > try mtime
    > atime is the time last accessed, not created
    > --
    > Posted viahttp://www.ruby-forum.com/.


    thanks
     
    nick, Oct 23, 2007
    #4
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ladygrinningsoul

    Modifying a file's time stamp

    ladygrinningsoul, Dec 5, 2004, in forum: Perl
    Replies:
    1
    Views:
    631
    ladygrinningsoul
    Dec 6, 2004
  2. =?Utf-8?B?QmVydA==?=

    Date/Time stamp in SQL

    =?Utf-8?B?QmVydA==?=, Jan 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    21,680
    Wardeaux
    Jan 30, 2004
  3. Zean Smith

    Time stamp problem

    Zean Smith, Feb 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    410
    Zean Smith
    Feb 7, 2006
  4. srini
    Replies:
    9
    Views:
    12,341
    Beauregard T. Shagnasty
    Apr 14, 2004
  5. BartlebyScrivener

    shutil.copy time stamp errors on win XP

    BartlebyScrivener, Apr 15, 2006, in forum: Python
    Replies:
    2
    Views:
    474
    BartlebyScrivener
    Apr 16, 2006
Loading...