Changing JPEG and Quicktime Modified Time based on Metadata

After copying stupid iPhone photos through the stupid iCloud Windows app and copying it to a Linux system, you'll likely lose all your modified times.

Here's a handy way to rewrite the mtimes based on file metadata:

Using exiftool:

1exiftool '-FileModifyDate<CreateDate' *.MOV

Using exiv2:

1exiv2 -T rename *.JPG

How about fixing the date created metadata?

1# Check file dates
2exiftool -datetimeoriginal *
4# Change all dates by subtracting 3 years and 8 months
5exiftool -datetimeoriginal-='3:8:0 0' -P -overwrite_original *
7# Change all dates by adding 2 years
8exiftool -datetimeoriginal+='2:0:0 0' -P -overwrite_original