ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: paolobenve on June 24, 2023, 02:20:54 PM

Title: changing the time zone part of various fields
Post by: paolobenve on June 24, 2023, 02:20:54 PM
I have a file which gives:

$ exiftool -time:all -a -g -G1 -s "Evento 2023-06-10--10.01.21.CR3"|grep "\-04:00"|grep -v System
[QuickTime]     CreateDate                      : 2023:06:10 10:58:21-04:00
[QuickTime]     ModifyDate                      : 2023:06:10 10:58:21-04:00
[Track1]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track1]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track1]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track1]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00
[Track2]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track2]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track2]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track2]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00
[Track3]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track3]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track3]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track3]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00
[Track4]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track4]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track4]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track4]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00

I must change the "-04:00" time zone in *Date fields to "+02:00".

How can I do it with exiftool?
Title: Re: changing the time zone part of various fields
Post by: StarGeek on June 24, 2023, 04:40:42 PM
What is the time zone you are currently in?  And what is the output of
exiftool -time:all --system:all -G1 -a -s "Evento 2023-06-10--10.01.21.CR3"

CR3 files are Quicktime based.  Because of this, all the time stamps you listed are in UTC and adjusted to the time zone of your computer.  The command above will show you all the time stamps.  I suspect that you will find some EXIF time stamps which will show "2023:06:10 16:58:21", which is probably the local time where the image was taken.

I do not believe you can change the time zone on those tags because it's the right time, just shifted to your local time.
Title: Re: changing the time zone part of various fields
Post by: paolobenve on June 24, 2023, 05:43:53 PM
> I do not believe you can change the time zone on those tags because it's the right time, just shifted to your local time.

The problem arise because I travelled back from tz=-04:00 to tz=+02:00 and didn't change the camera time zone settings. So the CR3's shot in the new tz have wrong local date/time and wrong time zone.

What would be the right way to correct this problem?

Because if I simply do a "-AllDates+=6" darktable (which supposedly uses exiv2) keeps reading a wrong date/time
Title: Re: changing the time zone part of various fields
Post by: paolobenve on June 24, 2023, 05:58:40 PM
Quote from: StarGeek on June 24, 2023, 04:40:42 PMwhat is the output of
exiftool -time:all --system:all -G1 -a -s "Evento 2023-06-10--10.58.21.CR3"

$ exiftool -time:all --system:all -G1 -a -s "Evento 2023-06-10--10.58.21.CR3"
[IFD0]          ModifyDate                      : 2023:06:10 10:58:21
[ExifIFD]       DateTimeOriginal                : 2023:06:10 10:58:21
[ExifIFD]       CreateDate                      : 2023:06:10 10:58:21
[ExifIFD]       OffsetTime                      : +02:00
[ExifIFD]       OffsetTimeOriginal              : +02:00
[ExifIFD]       OffsetTimeDigitized             : +02:00
[ExifIFD]       SubSecTime                      : 86
[ExifIFD]       SubSecTimeOriginal              : 86
[ExifIFD]       SubSecTimeDigitized             : 86
[Canon]         TimeZone                        : +02:00
[Canon]         TimeZoneCity                    : New York
[Canon]         DaylightSavings                 : On
[QuickTime]     CreateDate                      : 2023:06:10 10:58:21-04:00
[QuickTime]     ModifyDate                      : 2023:06:10 10:58:21-04:00
[Track1]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track1]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track1]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track1]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00
[Track2]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track2]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track2]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track2]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00
[Track3]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track3]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track3]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track3]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00
[Track4]        TrackCreateDate                 : 2023:06:10 10:58:21-04:00
[Track4]        TrackModifyDate                 : 2023:06:10 10:58:21-04:00
[Track4]        MediaCreateDate                 : 2023:06:10 10:58:21-04:00
[Track4]        MediaModifyDate                 : 2023:06:10 10:58:21-04:00
[Track4]        TimeStamp                       : 2023:06:10 04:58:21.86
[XMP-exif]      DateTimeOriginal                : 2023:06:10 10:58:21
[XMP-xmp]       CreateDate                      : 2023:06:10 10:58:21
[XMP-xmp]       ModifyDate                      : 2023:06:10 10:58:21
[Composite]     SubSecCreateDate                : 2023:06:10 10:58:21.86+02:00
[Composite]     SubSecDateTimeOriginal          : 2023:06:10 10:58:21.86+02:00
[Composite]     SubSecModifyDate                : 2023:06:10 10:58:21.86+02:00
Title: Re: changing the time zone part of various fields
Post by: StarGeek on June 24, 2023, 08:15:48 PM
So is "2023:06:10 10:58:21+02:00" the correct local time for where the image was shot?

And I'm assuming you're on Mac/Linux?