ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Mike55 on April 05, 2023, 02:01:29 AM

Title: Filename with offset calculation
Post by: Mike55 on April 05, 2023, 02:01:29 AM
Hello,

I would like to change the name of a MTS Videos.
[H264]          DateTimeOriginal                : 2018:09:22 12:31:32+02:00 DST
If I run the following command:
exiftool -ext mts "-FileName<DateTimeOriginal" -d "%Y%m%d_%H%M%S.%%e" "00015.MTS"
the name changes to 20180922_123132.MTS

Is there any way that the offset (+2 hours) is included in the name change? I would like the name to look like this: 20180922_143132.MTS

Thanks a lot
Title: Re: Filename with offset calculation
Post by: Phil Harvey on April 05, 2023, 08:19:45 AM
You can do what you ask by adding -globaltimeshift 2 to the command.

However, in the way times are represented the offset has already been applied.

eg. 12:31:32+02:00 is the same time as 10:31:32 UTC (10:31:32+00:00).

If you add +02:00 to 12:31:32 you get a meaningless time.

- Phil