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. Advertising

  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. Advertising

  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. Advertising

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. Roland
    Replies:
    0
    Views:
    1,053
    Roland
    May 12, 2004
  2. Matthias
    Replies:
    5
    Views:
    423
    Whitecrest
    Jun 1, 2004
  3. Yannick

    ASP changes Big JPG -> Small JPG

    Yannick, Feb 2, 2004, in forum: ASP General
    Replies:
    6
    Views:
    150
    Tim Williams
    Feb 3, 2004
  4. Vilmar Brazão de Oliveira
    Replies:
    14
    Views:
    345
    Aaron Bertrand [MVP]
    Mar 5, 2004
  5. Replies:
    3
    Views:
    257
    Andy Dingley
    Sep 27, 2006
Loading...

Share This Page