Set the date (EXIF) of a photo on Linux

August 13, 2020 [Linux, Tech]

To set the date when a photo was taken, install ExifTool e.g.:

sudo apt install libimage-exiftool-perl   # If on Ubuntu
sudo dnf install perl-Image-ExifTool.noarch  # If on Fedora

And modify the photo with a command like this:

exiftool -DateTimeOriginal='2020-08-13 12:00 UTC' myphoto.jpg

More info on the Exif tags you can edit is at ExifTool's docs.