58
\$\begingroup\$

I have two camera bodies, I was shooting while on vacation, when I downloaded the photos to lightroom, one body was set to the correct date/time, the other was off by 722 days, 4 hours, 32 minutes.

Is there a tool available that can help me fix the date/time so that they appear in sequence while browsing my lightroom library? I'd like for them to be as close to the right time.

I was able to adjust created year, month, date, but it doesn't appear lightroom will allow me to adjust increments (only hour increments).

Many thanks if you can help me in this task!

\$\endgroup\$
5
  • \$\begingroup\$ Possible duplicate: photo.stackexchange.com/questions/2973/…. \$\endgroup\$
    – jrista
    Commented Jan 30, 2011 at 23:05
  • 1
    \$\begingroup\$ Possible duplicate: photo.stackexchange.com/q/1473/21 \$\endgroup\$ Commented Jan 31, 2011 at 13:09
  • 4
    \$\begingroup\$ Not a duplicate of photo.stackexchange.com/questions/2973/… — that's about creating an EXIF timestamp when none exists. \$\endgroup\$
    – mattdm
    Commented Jan 31, 2011 at 13:46
  • 4
    \$\begingroup\$ And photo.stackexchange.com/questions/1473/… is too lightroom-specific. \$\endgroup\$
    – mattdm
    Commented Jan 31, 2011 at 13:47
  • 1
    \$\begingroup\$ Go set the clock in that second camera now before you forget and make another mess. Also, if you use a GPS with any of your cameras, there may be the option to have the camera clock automatically sync off the GPS clock. Now if only you could upload a timezone map and have the camera not only set the clock from the GPS, but determine the timezone from the lat/lon and apply it automatically. It amazes me the GPS units with maps already built in don't routinely do this. The extra data is tiny compared to the map data. \$\endgroup\$ Commented Jun 24, 2013 at 16:21

11 Answers 11

66
\$\begingroup\$

You can set, increment, and decrement Exif-Date (and File-Dates) with the following tools:

XnView (Windows)

  1. [mark pictures to be adjusted]
  2. Tools -> Change Timestamp

ExifTool (Windows and Mac OSX)

  1. exiftool "-AllDates+=1:12:28 14:54:32" -verbose *.jpg to adjust all JPG image dates by adding 1 year, 12 month, 28 days, 14 hours, 54 minutes, 32 seconds
  2. You can apply the change to all images in a folder or conditionally based on fields

Exifer (Windows)

  1. [mark pictures to be adjusted]
  2. (fails with newer JPG) ... I don't remember the commands
\$\endgroup\$
1
  • 6
    \$\begingroup\$ To just add or subtract 1 hour with exiftool, it's enough to just type exiftool -AllDates+=1 path\filename.jpg (to add) or exiftool -AllDates-=1 path\filename.jpg (to subtract). To perform the same operation on all files in a given folder one can use wildcard characters like *.jpg to process all files with the JPG extension, or *.* to process all files in a given folder. \$\endgroup\$
    – Samir
    Commented May 9, 2014 at 21:29
21
\$\begingroup\$

I just found the answer.

Lightroom will change the date/time easily by selecting the image you know the proper time for, then select all others to be changed - similar to how develop sync settings works.

After the selection is made, click

Metadata -> Edit Capture Time

Select Change to a specified date and time

Enter the proper date and time for that one image, Lightroom will adjust all other selected images by the same amount, relative to each image's own original time.

\$\endgroup\$
3
  • \$\begingroup\$ The only problem with this is that Lightroom can't change the EXIF parameter "Date Time Digitized" and "Date Time". It only changes "Date Time Original" which is the same as "Date created" in IPTC, or "capture time" as seen in the Default metadata preset. \$\endgroup\$
    – Samir
    Commented May 4, 2014 at 12:18
  • 1
    \$\begingroup\$ So LR is not changing all metadata elements. And even if that would be possible, it only stores the changes in the catalog, not in the original files. You can export the images to new files, but not everything will be changed. It can save metadata to original file (Ctrl+S or Metadata menu). But doesn't work for CR2 RAW files, it only produces XMP sidecar files. Even when you set the "write date or time changes into proprietary raw files" option, it still produces XMP sidecar files (possible bug). \$\endgroup\$
    – Samir
    Commented May 4, 2014 at 12:20
  • 4
    \$\begingroup\$ In short, Lightroom is useless at modifying this metadata information if you wish to save this out to the original files. It only works within Lightroom catalogs. I personally feel like this should be permanently set and saved in the original files, since this is a mistake made at the time the photos were captured (e.g. time zone shift or daylight saving mistake or multi-camera mismatch). \$\endgroup\$
    – Samir
    Commented May 4, 2014 at 12:23
14
\$\begingroup\$

Using Picasa (3.8) it's very easy to either shift or set the date of a batch of photos. And it's cross-platform (Windows, OSX and Linux) and free. And no terminal fiddling...

  1. Open Picasa
  2. Select your photos
  3. Click Tools > Adjust Date and Time
  4. Fill in as required (see screenshot)

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ GUI fiddling instead of terminal fiddling. :) \$\endgroup\$
    – mattdm
    Commented Jan 3, 2012 at 20:49
  • \$\begingroup\$ Actually, I downloaded, installed and tried exiftool(sno.phy.queensu.ca/~phil/exiftool) on OSX first, but I couldn't get it to work properly. I was able to batch shift the Last Modified date, but trying to change the other ones (creation date etc), all resulted in setting it to now(). I probably could have spend another half hour browsing the exiftool man pages, but picasa was much quicker to understand and use... \$\endgroup\$ Commented Jan 3, 2012 at 20:55
  • \$\begingroup\$ I'm mostly kidding. But for command line things like this, jhead is easier than the all-powerful exiftool. \$\endgroup\$
    – mattdm
    Commented Jan 3, 2012 at 21:01
14
\$\begingroup\$

The simple command-line program jhead is great for this. It's completely free (and open source) and is easily available for Windows, Mac, or Linux. If you're not used to command-line programs, this is a pretty non-intimidating one because there's not a lot to it. You have to format the dates correctly, but it's easy to do by following the examples (see the documentation I've included below).

It has a simple adjust by-hours command, but for big changes it also has an old -> new syntax which computes the difference for you (so you don't have to worry about leap years and so on). If you happen to have the wrong-set camera still at hand and still wrong, I find it handy to take a shot of a (time-synced) digital clock — then, take the date shown in the picture as "newdate" and the date in the metadata as "olddate" for the parameters below.

From the documentation:

   -ta<+|-><timediff>
          Adjust time stored in the Exif header by h:mm backwards or  for-
          wards.   Useful  when  having taken pictures with the wrong time
          set on the camera, such as after travelling across  time  zones,
          or when daylight savings time has changed.

          This  option  changes  all  Date/time fields in the exif header,
          including "DateTimeOriginal"  (tag  0x9003)  and  "DateTimeDigi-
          tized" (tag 0x9004).

   -da<newdate>-<olddate>

          Works  like  -ta,  but  for specifying large date offsets, to be
          used when fixing dates from  cameras  where  the  date  was  set
          incorrectly,  such  as  having  date  and  time reset by battery
          removal on some cameras

          Because different months and years  have  different  numbers  of
          days in them, a simple offset for months, days, years would lead
          to unexpected results at times.  The time offset is thus  speci-
          fied as a difference between two dates, so that jhead can figure
          out exactly how many days the timestamp needs to be adjusted by,
          including  leap  years  and  daylight savings time changes.  The
          dates are specified as yyyy:mm:dd.  For sub-day  adjustments,  a
          time of day can also be included, by specifying yyyy:nn:dd/hh:mm
          or yyyy:mm:dd/hh:mm:ss

          Examples:

          Year on camera was set to 2005  instead  of  2004  for  pictures
          taken in April

          jhead -da2004:03:01-2005:03:01

          Default  camera  date  is  2002:01:01,  and  date  was  reset on
          2005:05:29 at 11:21 am

          jhead -da2005:05:29/11:21-2002:01:01
\$\endgroup\$
5
  • \$\begingroup\$ Related question: unix.stackexchange.com/q/140427/9689 \$\endgroup\$ Commented Jul 19, 2015 at 12:44
  • \$\begingroup\$ How does one tell it to only change the photos in a specific folder instead of every photo stored on the entire computer? \$\endgroup\$
    – Michael C
    Commented Nov 26, 2020 at 8:09
  • \$\begingroup\$ It only operates on the files you tell it to, and does not recurse or affect other files. So jhead -da2004:03:01-2005:03:01 *.jpg will affect all of the files in the current directory, and no others. \$\endgroup\$
    – mattdm
    Commented Nov 27, 2020 at 1:12
  • \$\begingroup\$ @mattdm You're still assuming I know how to fill in the file path in the proper syntax and know where between :01 and * to place it. I don't. \$\endgroup\$
    – Michael C
    Commented Apr 24, 2022 at 9:06
  • \$\begingroup\$ There are two possible answers to that. The first is simple: you don't need to worry about that. The command I gave does what I said: operates on JPG files in the current directory. Change to the directory you want with the cd command, and run the command there. The second is: the *.jpg argument is the list of files to operate on. The exact syntax depends on your operating system and the shell it uses. There are a lot of resources which show how to use filename arguments in shell commands and that seems out of scope. If that's an unsatisfactory answer... that's why I offer the first one! \$\endgroup\$
    – mattdm
    Commented Apr 24, 2022 at 21:12
5
\$\begingroup\$

A trick I use to sync different cameras used on a trip is to take a simultaneous photo - then you know exactly what the offset is and you don't have to guess. This is particularly helpful when some cameras are owned by others and they have no clue how to set the time.

I've taken to setting all my cameras to UTC so there's never any question of what the "correct" time is, and it doesn't vary between time zones.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Or take a photo of a clock synced to an accurate time server (a cell phone should do) with both cameras. \$\endgroup\$
    – mattdm
    Commented Aug 14, 2011 at 23:50
  • \$\begingroup\$ That's what I would suggest. If possible, I take a picture of the time.is page. \$\endgroup\$
    – texnic
    Commented Nov 2, 2013 at 14:00
  • \$\begingroup\$ @mattdm: Yes, definitely. The missing context is this was a backcountry context with no accurate reference available. \$\endgroup\$
    – Reid
    Commented May 28, 2019 at 19:04
4
\$\begingroup\$

This is very helpful, it shows many available tools:

http://petapixel.com/2012/11/05/how-to-fix-your-timestamps-if-you-forgot-to-update-your-camera-for-daylight-savings/

namely how to use Adobe Lightroom, Picasa, Jhead, ExifTool and Exifer to shift the date.

Personally I use ExifTool, and Exiv2, which works on MacOSX to do the following in the terminal:

find . -name '*.JPG' -exec bash -c 'mv "$1" "${1/%.JPG/.jpg}"' -- {} \;
exiftool “-DateTimeOriginal+=0:1:2 3:4:5″ .
exiv2 -r'Some_words_%Y%m%d_%H%M%S' rename *.jpg

Which renames all '.JPG' files to '.jpg', shifts the date of all photos in current folder forward 0 years 1 month 2 days 3 hours 4 minutes and 5 seconds, then renames all photos in the current folder to "Some_words_" followed by the date and time. E.g. "Some_words_20130625_1554.jpg"

To install exiv2 you should be able to

brew install exiv2

if you use brew, and I was pointed here for ExifTool

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Thanks for the tip, it works perfectly on Linux (Ubuntu). If you simply want to shift by 1 hour every photo in the current directory, the following command is enough: exiftool "-DateTimeOriginal-=0:0:0 1:0:0" . \$\endgroup\$
    – Xavier
    Commented Dec 24, 2014 at 14:35
  • 1
    \$\begingroup\$ Point of detail for future searchers: the find command above renames all .JPG files to .jpg in the current folder and in all subfolders. The other two commands (exiftool and exiv2) don't recurse subfolders. \$\endgroup\$
    – scottbb
    Commented Feb 5, 2017 at 13:21
2
\$\begingroup\$

If you use windows, Windows Live Photo Gallery has this feature where you can 'move' the time of a group of photos by a certain period.

\$\endgroup\$
1
  • \$\begingroup\$ My apologies, should have mentioned mac platform. \$\endgroup\$ Commented Jan 30, 2011 at 21:52
1
\$\begingroup\$

By far the easiest trick is to take a picture of a clock with all the camera's you took on your trip. Then correct the time by copying the time on the clock in the picture. Read on how I did this in iPhoto (this can also be done in Picasa. Not sure about Lightroom and Aperture):

http://rolfje.com/2011/08/15/fixing-photo-creation-dates/

\$\endgroup\$
1
\$\begingroup\$

Attribute Changer, a utility for Windows, can edit dates file was created, edited, accessed and also taken. Select your files in explorer, right click and there it is. Has nice offset settings.

\$\endgroup\$
1
\$\begingroup\$

I just used the free version of Exif Date Changer for this and it worked like a charm. Friendly and simple UI, everything works as expected.

\$\endgroup\$
1
\$\begingroup\$

There is this great software for all Batch editing needs called "Faststone Image Viewer"

  1. At first, select your images, open ToolsChange Timestamp.
  2. You can choose either change File timestamp OR EXIF Timestamp (Date Time Photo Taken).
  3. Adjust +/- hours and minutes OR Specify Specific Date OR Date and Time.
  4. Push "Apply to Selected File(s)" button and the date/timestamp will be updated!

enter image description here

https://www.faststone.org/FSIVDownload.htm

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.