Manipulating file dates

Mike Oliver moliver-fC0AHe2n+mcIvw5+aKnW+Pd9D2ou9A/h at public.gmane.org
Wed Mar 31 08:47:07 UTC 2010


Renata Rocha wrote:
> On Sat, Mar 27, 2010 at 15:03, Giles Orr <gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
>> I'll shortly be boarding a flight back to Toronto, at which time I'll
>> have about a thousand photos with the wrong time stamp on them (I
>> never remember to reset the camera until about five days have passed).
>>  All the photos have a Toronto time stamp on them, when what I need is
>> six hours later.
> I'm pretty sure you won't need to change the files' date, but the jpg
> headers info.
>
> There's a command line tool named "exif" (self-describing)  which
> deals with exif headers. May be useful for what you need.

With that or with exiftool, you'll have to do some scripting, which
is fine if you like that sort of thing, but it isn't really necessary.
The "jhead" command will allow you to specify a delta from the existing
EXIF timestamp, and apply it to *.jpg in a directory.  Use
"jhead -ta hh:mm:ss" (or a minus sign in the obvious place
for a negative delta).

One good trick, if you're using a GPS and you want to correlate
the photos based on the timestamp, is to take a shot of the GPSs
time display, so that you know the exact delta.

Unfortunately it works only on JPEGs (and not, for example,
on DNGs, which also have EXIF headers).

One final remark -- I've come to the conclusion that it's simply
better *not* to reset your camera's clock to the new time zone when
travelling (or your laptop's, either), unless it's quite a long trip.
It's easier to remember to convert those times in your head than it
is to figure out which timestamps apply to which time zone.  Very much
too bad that timestamps don't include time-zone info, to allow automatic
conversion.

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list