How can I fix timestamps that didn't take daylight saving time into account?

Started by sdm, July 12, 2022, 03:36:12 PM

Previous topic - Next topic

sdm

A friend sent photos recently taken in Bulgaria on a Canon camera with no GPS capability. Under standard time, Bulgaria is GMT+2, but currently it's daylight saving time there, so at this time it's GMT+3. The camera on which the photos were taken didn't take this into account, so the timestamps are all for GMT+2. For example:
[EXIF]          OffsetTime                      : +02:00
[EXIF]          OffsetTimeOriginal              : +02:00
[EXIF]          OffsetTimeDigitized             : +02:00
[MakerNotes]    TimeZone                        : +02:00
[MakerNotes]    TimeZoneCity                    : Cairo
[MakerNotes]    DaylightSavings                 : Off
[Composite]     SubSecCreateDate                : 2022:06:29 17:24:11.53+02:00
[Composite]     SubSecDateTimeOriginal          : 2022:06:29 17:24:11.53+02:00
[Composite]     SubSecModifyDate                : 2022:06:29 17:24:11.53+02:00

All the times are an hour too late (e.g., the photo with this metadata was taken at 17:24:11 GMT+3, not 17:24:11 GMT+2). I'm trying to figure out the best way to fix this.

The friend also sent a bunch of photos taken with a cell phone. Their timestamps all show GMT+3, so one possibility is add an hour to all the timezones in the Canon photos' metadata. However, I worry that that will conflict with the TimeZoneCity value of Cairo. Another possibility is to subtract an hour from all the timestamps (e.g., to change 17:24:11 to 16:24:11), but that will leave them all at GMT+2, and it really was GMT+3 when they were taken. I suppose I could change the value of DaylightSavings from Off to On, but I don't know what effect that would have.

My primary motivation is to get Google Photos to correctly sort the photos chronologically. As things stand now, it treats a photo with a timestamp of 17:24:11+02:00 as having been taken after a photo with a timestamp of 17:30:00+03:00. Since the photo with the GMT+2 timestamp was actually taken in GMT+3, it should be treated as if it had been taken first, and I want to find a way to get Google Photos to do that.

Thanks for any advice you can offer!

StarGeek

Quote from: sdm on July 12, 2022, 03:36:12 PM
All the times are an hour too late (e.g., the photo with this metadata was taken at 17:24:11 GMT+3, not 17:24:11 GMT+2). I'm trying to figure out the best way to fix this.

So the actual time doesn't need to be changed, just the time zone portion.  This command will set the four tags shown in your output
exiftool -OffsetTime*=+03:00 -DaylightSavings=On /path/to/files/

QuoteAnother possibility is to subtract an hour from all the timestamps (e.g., to change 17:24:11 to 16:24:11), but that will leave them all at GMT+2, and it really was GMT+3 when they were taken

That would be incorrect according to the specs. The time should be set to the local time where the image was taken.

QuoteI suppose I could change the value of DaylightSavings from Off to On, but I don't know what effect that would have.

Technically, this would have no effect.  I believe that the Canon Makernotes Timezone is supposed to be set to the correct Standard Time zone, and you toggle the DaylightSavings on and off in the options.  So when it's Daylight Saving/Summertime, the TimeZone would remain the same and the DaylightSavings option tells the camera to adjust the time accordingly.  But overall, these tags have no impact other than telling you what the camera settings were at the time of the photo.  You can correct it if you want, as I do in the above command.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).