News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Timezone not extracted when specifying tag

Started by kura, February 15, 2020, 08:39:51 AM

Previous topic - Next topic

kura

It looks like exiftool does not output the timezone when specifying a tag for extraction, and I tried to get it to output using a date format string (%z) but that just dumped the system time instead of the timezone in the metadata.

Is there any workaround?

Many thanks in advance for any advice... the difference can be seen in the output below.
(I am currently in UTC+08:00 but the photo was taken in UTC-08:00).


$exiftool img.jpg
-- snip --
Shutter Speed                   : 1/2347
Create Date                     : 2019:12:06 10:18:49.878986-08:00
Date/Time Original              : 2019:12:06 10:18:49.878986-08:00
Modify Date                     : 2019:12:06 10:18:49.878986-08:00
Thumbnail Image                 : (Binary data 4661 bytes, use -b option to extract)
GPS Altitude                    : 3.7 m Above Sea Level
GPS Date/Time                   : 2019:12:06 18:18:05Z
GPS Latitude                    : 37 deg 24' 44.52" N
--- snip --



$exiftool img.jpg -createDate
Create Date                     : 2019:12:06 10:18:49



exiftool img.jpg -createDate -d "%Y:%m:%d %T %z"
Create Date                     : 2019:12:06 10:18:49 +0800


🤔🤔🤔

Am I using the date format string wrong?

kura


1) Your system type (Windows XP, Linux, Mac, etc). --> Mac OS X 10.15.3
2) The ExifTool version you are using (the output of the "exiftool -ver" command).  --> 11.87
3) The specific command line you are using (or a sample script if having problems with the API). --> see above
4) The console output from the command. --> see above
5) Sample image attached

Alan Clifford

If you run

exiftool -G img.jpg

I'd expect you to see that the createdate with timezone is in the composite group.

If you run
exiftool -G -s img.jpg

I'd exect that tag to be called SubSecCreateDate rather than createdate.

That is what I am getting from your img.jpg


StarGeek

Alan is correct.  This is a FAQ #2 and a bit of FAQ #3. 

   When you run exiftool, by default it prints descriptions, not tag names

If you run
exiftool -time:all -G1 -a -s img.jpg
you'll see all time related tags, including duplicates.  In this case, the tags that include a time zone (not counting the file system tags) are SubSecCreateDate, SubSecDateTimeOriginal, and SubSecModifyDate.  These are all in the Composite group, meaning they are tags that exiftool is creating based upon other tags in the file.  All three of these tags are created using DateTimeOriginal, ModifyDate, and CreateDate and the matching OffsetTimeOriginal, OffsetTimeDigitized, and OffsetTime tags, which hold the time zone.


* 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).