How to adjust timestamp on multiple photos?

Hi All,

I’ve gotten myself into a tricky situation. I went away for a holiday abroad and forgot to reset my camera’s clock to a local time. I took over 1700 photos and now all of them are 6 hours ahead of the actual time they were taken.

All images are in JPG format by the way.

I can use exiftool to adjust time data in the EXIF on all files in a particular folder, but it creates another problem. Whenever exiftool changes time within the file (in EXIF), modified date on the file system changes to whenever the exiftool made the changes and that is a problem.

I still have all the original files with the original modified date (the one 6h in future, but not affected by exiftool adjustments yet).

touch command seem to work with one file at a time, so it doesn’t help me.

So my question really is - how do I restore modified date timestamp to what it was before I performed date corrections with exiftool?

jhead is the tool you want and the option is -ta. You can get it to change the file modification date to match the EXIF timestamp also. Best to start from the originals.

thanks ken_yap,

man page looks promising. I’ll definitely give it a try once I get back home tonight.

While the advice to use jhead seems to be excelent to me, I can not let go the bad words you speak about touch. It works on more then one file at the time as the man page clearly says. I do not understand why you come to the conclusion that “touch command seem to work with one file at a time”.

thank you for correction, I will have to read the man page more attentively next time

On 2011-09-21 19:36, hcvv wrote:
>
> While the advice to use -jhead- seems to be excelent to me, I can not
> let go the bad words you speak about -touch.- It works on more then one
> file at the time as the -man- page clearly says. I do not understand why
> you come to the conclusion that “touch command seem to work with one
> file at a time”.

You have to set up a different time on each file, one by one, according to
their exif file data. It is possible to use touch, but you need a list of
times to be fed somehow, or a script querying exif data and touching each file.

:slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

This is way too tedious, especially for a non programmer. I’ve tried jhead and it does what I need and does it brilliantly (except maybe it doesn’t change XMP and IPTC data, but that is not so important).

Oh, and now I have another issue with digikam and metadata recovery, but I’ve fired up another thread for that -> How do I restore comments (captions), titles and tags from digiKam database?

Would appreciate help on this one as well.

On 2011-09-22 00:16, RaveNBlack wrote:
>
> robin_listas;2386395 Wrote:

> This is way too tedious, especially for a non programmer.

Absolutely. I wasn’t recommending that method, just considering what would
be needed in order to do it with touch.

> Oh, and now I have another issue with digikam and metadata recovery,
> but I’ve fired up another thread for that -> ‘How do I restore comments
> (captions), titles and tags from digiKam database?’
> (http://tinyurl.com/3b6c43k)

No idea.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)