NOTE: the following does not change either the EXIF data or the actual timestamp of the files - just their names. It may be preferable to change all three consistently (perhaps possible using exiftool
?)
It seems to be possible using the perl based prename
/ rename
command, using strptime
to read in the formatted time string, then strftime
to write it back out after adding an offset - in seconds (implicitly converted to a Time::Piece object).
Based on comments, by "my wife's camera had a time shift of 5:46" you appear to mean 5 hours 46 minutes (rather than, say, 5 minutes 46 seconds), and you require a shift (forward) of 5 x 3600 + 46 x 60 = 20760 seconds. So you could do:
prename -vn -- '
BEGIN{use Time::Piece};
s/\d+_\d+/(20760+Time::Piece->strptime($&, "%Y%m%d_%H%M%S"))->strftime("%Y%m%d_%H%M%S")/e
' *.jpg
20161019_112301.jpg renamed as 20161019_170901.jpg
The -n
flag is for testing - remove it when you are sure the command is performing the right conversion.
See this related question How can I batch convert folder names from one date format to another
rename
might be able to do the job, but I'm guessing you would need to create/put together a command to do what you want to do and I'm not sure what you would have to do. – Ads20000 Oct 30 '16 at 12:54