Darkroom timer · estimate
Camera clock offset calculator
If a camera's clock was set wrong, the photos it took carry the wrong date and time, and any timeline sorted by those dates puts them in the wrong place. Enter the time one photo shows and the time it was really taken. The calculator gives the shift to apply to photos taken while the camera's clock had that same offset.
Work out the offset
- Days
- 0
- Hours
- 0
- Minutes
- 0
- Seconds
- 0
ExifTool shift, in its Y:M:D H:M:S form (estimate)
The command shifts the DateTimeOriginal, CreateDate and ModifyDate timestamps, where a file has them. Point it only at a folder of copies from that one batch.
How the offset is worked out
offset = real time − time the photo shows
- Days = whole days in the size of the offset (86,400 seconds per day).
- Hours, minutes and seconds = what is left, split by 3,600 and 60 seconds.
- A positive offset means the camera was behind, so the shift is added (
+=). A negative one means it was ahead, so it is subtracted (-=). - The shift string follows the
Y:M:D H:M:Sform, with the years and months set to 0:0:0:D H:M:S.
Assumptions behind the estimate
- Both entries are read as plain clock readings. No time zone and no daylight-saving change is applied to either one, so the offset is the difference between the two readings exactly as typed.
- The camera clock was off by the same amount for every photo in the batch. If the clock was changed part of the way through, work out a separate offset for each part.
- Whole seconds only. Fractions of a second are ignored.
- Times more than 36,524 days and 6 hours apart (about 100 years, using the Gregorian mean year of 365.2425 days) are refused. That is this calculator's own limit, so for example 2000-01-01 and 2100-01-01 are refused. Years must have four digits, 1000 to 9999, which is the range this calculator supports.
- Two warnings are this calculator's own thresholds, not ExifTool rules: a note appears at 28 days or more, and a stronger note at 365 days or more.
- Nothing you enter leaves this page. The sum runs in your browser.
Before you run the command
The command is a starting point. Check the shift syntax against the ExifTool documentation below, run it on copies of your photos first, and compare one corrected photo with the real time before you change a whole folder. The command shifts the DateTimeOriginal, CreateDate and ModifyDate timestamps where a file has them and they can be written (that is what ExifTool's AllDates shortcut covers). Put only copies of the photos from that one batch in the folder, so photos with a different offset are not shifted. Replace /path/to/copies with your own folder.
References
- ExifTool Date/Time Shift Module (ExifTool project)
- exiftool Application Documentation (ExifTool project)
- ExifTool Shortcuts Tags (ExifTool project)
- ECMAScript 2025 Language Specification, Time-related Constants (Ecma International, TC39)
- ECMAScript 2025 Language Specification, Time Values and Time Range (Ecma International, TC39)