MiniExifTool date formats

I’m getting

Sat Jun 09 23:10:57 -0700 2007

as output from

photo.DateTimeOriginal

I’d like to avoid parsing it myself and should think I’d be able to get
an easier to deal with format. I’m going to change it to 2006.10.14
after shifting the time from the camera’s UTC to the local date.

So a YYYYMMDD format would be easy to deal with. I suspect that the
format I’m seeing has to do with using it on my OS X system. (I’m
guessing that the -0700 is the GMT offset, but this is my computer
offset. My camera doesn’t know what time zone it is set to. That’s a
clue to me that my OS is affecting the output.)

Thanks for any help. And thanks again Jan for putting MiniExifTool
together.

It worked! Posting that is. Posting a question engaged the correct part
of my brain.

Time.xmlschema is close enough. I am wondering if there aren’t more
extensive conversions as in PHP using mktime to convert formats.

12 34 wrote:

It worked! Posting that is. Posting a question engaged the correct part
of my brain.

Time.xmlschema is close enough. I am wondering if there aren’t more
extensive conversions as in PHP using mktime to convert formats.

Worked again. Found strtime.

Too bad we can’t revise or delete in this forum.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs