Is it possible to copy the timezone from Keys or UserData to Canon tags?

Started by Tonio, October 20, 2022, 10:07:58 AM

Previous topic - Next topic

Tonio

Hello,

I am trying to get rid of wrong timezones saved by my 90D Canon camera into [Canon] and [ExifIFD] tags ([IFD0] doesn't store timezone, am I right?)

Is there any way to copy the timezone already stored in [UserData] or [Keys] tags to [Canon] and [ExifIFD]?

I already know a command to set the time stored in those fields, picture by picture:
exiftool -ThumbnailImage -b file | exiftool -time:all='YYYY:MM:JJ hh:mm:ss' -timezone='+XX:xx' -wm w - | exiftool -ThumbnailImage'<=-' -wm w file
but it doesn't work for timezones on a 600D Canon camera. It works fine for 90D. I don't understand why? The 600D didn't have the ability to store timezone in those tags?

So as the timezone is already stored in [Keys] tags I wonder if there is any way to copy it from [Keys] to [Canon] to gain more time, because editing each video one by one can take a while... and it doesn't even work for 600D videos...


Thank you!!

Tonio

Phil Harvey

Hi Tonio,

You are doing something that is very odd here.  Some Canon cameras do write thumbnails to video files, but this isn't a usual place to store metadata.  I think the TimeZone tag you are writing is in the Canon MakerNotes, correct?  ExifTool will not create MakeNotes tags if they don't exist, so this may be why writing TimeZone doesn't work for the 600D.

But to answer your question, you can set EXIF timezone tags from any date/time tag that includes a time zone, but the Canon TimeZone tag isn't that flexible.  To set it, you would have to do something like this to remove the date/time part:

    "-timezone<${DATETIMETAGWITHTIMEZONE;$_=~s/.*([-+])/$1/}"

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Tonio

Hello and thank you for your answer,

Wow this is such a thing! I'm not sure to understand, is this a command? Or the "timezone" part of the command I mentioned above? I can't run this part of code like this no?

Actually what I am trying to do is not that odd, even if I understand your perplexity
you will better understand with this picture: https://ibb.co/3yJfcYR

The [ExifIFD] tag has correct "OffsetTime" (after being set up by GraphicConverter 11 with Exif timezone edit function) but the [Canon] "timezone" tag is wrong. So it creates what you can see on the picture. I just want to put the [ExifIFD] into [Canon], so there is no difference anymore.

If you know how it could be possible it would be very nice!

Thank you. Tonio

Phil Harvey

Previously you said you wanted to copy the [Keys] timezone to [Canon].  Now it is [ExifIFD] to [Canon], which is simpler (because both are time-zone-only values, whereas the [Keys] tags would have been date+time+timezone).  Here is the command-line argument to copy from EXIF:OffsetTime:

    "-timezone<offsettime"

- Phi
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Tonio

Oh, sorry, you are right, in the meantime I found how to get OffsetTime correctly set so I tried to find an easier solution.

I tried both and both failed so I start to get confused :'(
https://ibb.co/v4DgxDR

Here what I can't edit:
https://ibb.co/SNfNXd2


Thank you anyway,

Tonio

Tonio

Hello again and thank you for your help, the command worked!

To finish, I am now trying to set the field "Summer time" (as shown "Heure d'été") on my very last picture, to "On" instead of "Off" for pictures with timezone +02:00.

Any help would be very appreciated

Thank you,

Tonio

Phil Harvey

Hi Tonio,

That picture doesn't help at all.  You need to determine the ExifTool tag name so you can write this information.  See FAQ 2 and 3 for help here.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Tonio

After trying all possible combinations, I finally figured it out, I had to run
exiftool "-timezone<offsettime" -daylightsavings="On" .
It works perfectly!
Only problem, when I try to check with
exiftool -i hidden -ee -timezone -offsettime -daylightsavings -api largefilesupport=1 -fileorder filename -r .
it displays 2 times the result for every picture.

Tonio

StarGeek

One thing to take note of is that the Canon Timezone tag is supposed to be set to the time zone without regards to if it's Daylight savings/Summertime.  As you found, there is a separate entry that tells the camera if Summertime is ON or OFF.

For example, I'm on Pacific time, so the time zone in my camera is set to -08:00.  When Daylight Savings comes up, I change the setting in the camera from OFF to ON.  The time zone remains at -08:00 but the time is adjusted because of the Daylight Savings setting.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Tonio

Hello!

Sorry, I didn't know the case had to be taken into account in exiftool commands. Are there other options that need to be capitalized, please? Or can I see them all on a specific page? I didn't see anything about this in FAQ
I never capitalize before running commands...

thank you

Tonio

Tonio

Quote from: StarGeek on October 20, 2022, 05:57:54 PMThe time zone remains at -08:00 but the time is adjusted because of the Daylight Savings setting

you are totally right, I think I had trouble with that functionality, this is why I get photos that are not up to date, or with inconsistencies like this
I was able to correct all of them with the Exiftool command
Quote from: Tonio on October 20, 2022, 04:18:40 PMexiftool "-timezone<offsettime" -daylightsavings="On" .

but it would be way better if this kind of problems could not occur anymore so I bought a GPS for Canon

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Tonio