How to use the current time while recognizing the timezone (so - 2 hours?)

Started by PresFox, June 18, 2022, 07:55:50 AM

Previous topic - Next topic

PresFox

Hello,

I am using Exiftool to edit the CreateDate of a file. I am using <$now for that which works fine. However, all times are 2 hours in the future.

I recognize that this probably has to do with timezone issues. Question is, how can I change the $now time to take 2 hours off?

I tried:
exiftool -AllDates<$now-="0:0:0 02:00:00" -o e:/newVid.mp4 e:/oldVid.mp4

But that does not work and still gives me the time + 2 hours.

Any help would be greatly appreciated!

StarGeek

What is the exact output of the time you are seeing?  And what is the result you are looking for.

The now tag returns the exact time and time zone that is on the computer it is running on.  If the time is actually two hours ahead, then the computer is set to that time.
"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

StarGeek

I just realized that your example uses a video.  In that case, the fourth paragraph on the Quicktime tags page applies.  And it probably means you're looking at the date with something other than exiftool, which is an important detail to leave out.

If you add the -api QuickTimeUTC option, then exiftool will do the conversion to UTC for you.

exiftool "-AllDates<now" -api QuickTimeUTC -o e:/newVid.mp4 e:/oldVid.mp4
"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