Feature Request: Improve Time Zone Handling

Started by brianr2600, September 08, 2017, 01:49:00 PM

Previous topic - Next topic

brianr2600

It would be helpful if exiftool could consider all available time zone information when producing composite tags like SubSecCreateDate. For example, it could consider the value of MakerNotes:TimeZone and MakerNotes:DaylightSavings or the GPS timestamp (which is guaranteed to be in UTC), or other factors when attempting to localize the time.

In my case, I have many photos taken with a Nikon DSLR where the clock and time zone are set to UTC and none of the stamps can be automatically converted to local time because the camera doesn't include the more modern EXIF:OffsetTimeXYZ tags. The example time_zone.config does roughly what I have in mind to determine the time zone based on preferential list of possible source tags. I'm guessing I might use it as a starting point for a config which adds a tag for the full time and time zone, but it seems more aggressive time localization would be useful enough it ought to be included in exiftool proper. 

Hayo Baan

Hi Brian,

There is a very good reason why exiftool doesn't "convert" those times to local time: the tags you reference are all supposed to be local time already! They should NOT be UTC. I therefore suggest you actually correct the times of your files to be local time (of the place of shooting) again instead of trying to have exiftool treat your (erroneous) UTC times as local times. The example time_zone.config is indeed what I would use to help deciphering what the local time should be.

It should not be too difficult to create a script that will automatically convert the UTC times. If you need help with this, just let me know (I'm currently with little to no computer access though, so it will be a while before I am able to respond).
Hayo Baan – Photography
Web: www.hayobaan.nl

brianr2600

Sorry for the confusion. I'm not proposing that exiftool convert the times to local, but rather that it consider all available information when producing the composite tags so the output winds up qualified with a time zone when there's enough information to do so reliably.

Presently ExifTool will includes the time zone offset in composite dates if it's present in certain tags like OffsetTime*. Before these tags were standardized it was common for the same information to be stored in various other tags like MakerNotes:TimeZone, but these are not currently considered when producing the various composite timestamp tags.