Manipulating file dates
Eric Battersby
gyre-Ja3L+HSX0kI at public.gmane.org
Wed Mar 31 09:17:44 UTC 2010
On Wed, 31 Mar 2010, Mike Oliver wrote:
> 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.
There are three timestamp fields in EXIF:
original
digititized
modified
Usually the original and digititized timestamps are the same.
If you have GPS builtin, there is also a GPS timestamp.
I'll assume no GPS, otherwise use that to sync.
Most of the answers given are trying to solve a symptom,
instead of addressing the cause. Does anyone doubt that this
same problem will occur again (and again) due to human error
(when travelling to another timezone, or when daylight savings
switches)?
Since, EXIF has no timezone, it should be obvious that the
camera clock should always be set to UTC, just like in Linux.
Upon display, you (or a program) can translate that timestamp
to your local timezone, just like Linux does with its
filesystem timestamps.
--
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