News:

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

Main Menu

Timezone but no timezone

Started by aab203, March 12, 2019, 12:27:46 PM

Previous topic - Next topic

aab203

Hello,

I've been struggling trying to figure out how to best deal with what appears to be a clash of UTC information in my images and videos.  Whenever I am about to tidy up a folder of images I typically run this command to give me an idea of quality / missing tags

exiftool -T -filename -timezone -make -fileCreateDate -fileModifyDate -dateTimeOriginal -createDate -creationDate -contentCreateDate -r .

An example of an output with some files is


IMG_2392.JPG - Apple 2018:10:30 13:30:48+00:00 2018:10:30 13:30:48+00:00 2018:10:30 13:30:48 2018:10:30 13:30:48 - -
IMG_1937.JPG - Apple 2018:09:01 10:09:33+01:00 2018:09:01 10:09:33+01:00 2018:09:01 09:09:33 2018:09:01 09:09:33 - -
IMG_1936.JPG - Apple 2018:09:01 10:09:28+01:00 2018:09:01 10:09:28+01:00 2018:09:01 09:09:28 2018:09:01 09:09:28 - -
IMG_2393.JPG - Apple 2018:10:30 14:12:22+00:00 2018:10:30 14:12:22+00:00 2018:10:30 14:12:22 2018:10:30 14:12:22 - -
IMG_1394.MOV - Apple 2018:07:18 17:48:49+01:00 2018:07:18 17:48:49+01:00 - 2018:07:18 16:48:49 2018:07:18 17:48:49+01:00 -
BHIO7261.MOV - Apple 2018:01:05 09:42:42+00:00 2018:01:05 09:42:42+00:00 - 2019:03:08 20:27:02 2018:01:05 09:42:42+00:00 -
IMG_2382.JPG - Apple 2018:10:30 11:09:50+00:00 2018:10:30 11:09:50+00:00 2018:10:30 11:09:50 2018:10:30 11:09:50 - -
IMG_1310.JPG - Apple 2018:07:11 11:34:53+01:00 2018:07:11 11:34:53+01:00 2018:07:11 10:34:53 2018:07:11 10:34:53 - -
IMG_0967.JPG - Apple 2018:06:07 18:11:53+01:00 2018:06:07 18:11:53+01:00 2018:06:07 17:11:53 2018:06:07 17:11:53 - -
IMG_2009.JPG - Apple 2018:09:08 17:02:02+01:00 2018:09:08 17:02:02+01:00 2018:09:08 16:02:02 2018:09:08 16:02:02 - -
IMG_0353.JPG - Apple 2018:03:01 14:21:01+00:00 2018:03:01 14:21:01+00:00 2018:03:01 14:21:01 2018:03:01 14:21:01 - -
IMG_2342.JPG - Apple 2018:10:19 15:34:19+01:00 2018:10:19 15:34:19+01:00 2018:10:19 14:34:19 2018:10:19 14:34:19 - -
IMG_3208.MOV - Apple 2019:02:13 17:09:33+00:00 2019:02:13 17:09:33+00:00 - 2019:02:13 17:09:33 2019:02:13 17:09:33+00:00 -
IMG_0958.JPG - Apple 2018:06:05 14:10:33+01:00 2018:06:05 14:10:33+01:00 2018:06:05 13:10:33 2018:06:05 13:10:33 - -
IMG_0970.JPG - Apple 2018:06:08 10:09:11+01:00 2018:06:08 10:09:11+01:00 2018:06:08 09:09:11 2018:06:08 09:09:11 - -


For the pictures (JPG)

  • None of the jpegs have UTC/timzeone information in the dateTimeOriginal or createDate attributes
  • There are a mix of jpegs which have either +00:00 or +01:00 at the end of the fileCreateDate and fileModifyDate
  • --> I don't understand how this has happened as these photos were taken on an iPhone, both in the UK
I would like to ensure the date is consistent for all time based attributes, so I'd like to ensure all dates are basically UTC0 - all based on the dateTimeOriginal value

For the videos (MOV)

  • The creationDate is the accurate value for all the videos
  • There are a mix of them which have either +00:00 or +01:00 at the end of the creationDate
  • --> As with the jpegs I don't understand how this has happened as these videos were taken on an iPhone, both in the UK
I would like to ensure the date is consistent for all time based attributes, so I'd like to ensure all dates are basically UTC0 - all based on the creationDate value.  I understand videos are a different kettle of fish and not all tags are writable, but hopefully there is a solution to have everything UTC0.

Many thanks in advance

Phil Harvey

FileCreateDate and FileModifyDate are taken from the filesystem (ie. not stored in the file), and the time zone is your computer system time zone.

- 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 ($).

StarGeek

Quote from: aab203 on March 12, 2019, 12:27:46 PM
None of the jpegs have UTC/timzeone information in the dateTimeOriginal or createDate attributes

The EXIF standard originally didn't allow for timezone data in these tags.  It is now an option but not many programs use it and I'd be surprised at any camera that set it.  The appropriate tags and the timestamps they match are OffsetTime:ModifyDate, OffsetTimeOriginal:DateTimeOriginal, and OffsetTimeDigitized:CreateDate.

QuoteThere are a mix of jpegs which have either +00:00 or +01:00 at the end of the fileCreateDate and fileModifyDate

As Phil said.  Basically, you can consider the system tags to be already written in UTC and the computer will automatically adjust the time displayed to match the current timezone set in the computer.  There is no way to change the displayed value without resetting your computer time zone to UTC and then changing it every time daylight savings begins/ends.  And that would mess up time zone data for everything else on the computer.

QuoteI would like to ensure the date is consistent for all time based attributes, so I'd like to ensure all dates are basically UTC0

For jpegs, the time stamps are considered to be local time for where they were taken.  Most, if not all programs will treat it as such.

Just my opinion, but instead of rewriting the timestamps, I would consider adding the time zone to the appropriate places, and then using that combined value to write to GPSDateStamp/GPSTimeStamp, which is supposed to be UTC.  It might prevent problems down the line.

With video, you run into the opposite problem.  The CreateDate is supposed to be UTC time.
* 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).

aab203

Thank you both for the replies.  Ultimately the problem that results with this is that when I upload the images and videos to Google Photos, things become out of place as some of the items will be treated with a UTC0 or 1.  I cannot change the creationDate for the mov files so perhaps I have to align all of the jpg's to at least match the video timestamps. 

Would I use the exiftool '-timezone=00:00' command to achieve this (replacing 00:00 with the appropriate offset).

Also, should I be setting the OffsetTime:ModifyDate, OffsetTimeOriginal:DateTimeOriginal, and OffsetTimeDigitized:CreateDate attributes that you mentioned, StarGeek?

Many thanks.

StarGeek

QuoteAlso, should I be setting the OffsetTime:ModifyDate, OffsetTimeOriginal:DateTimeOriginal, and OffsetTimeDigitized:CreateDate attributes that you mentioned, StarGeek?

First to clarify
OffsetTime is the timezone for ModifyDate
OffsetTimeOriginal is the timezone for DateTimeOriginal
OffsetTimeDigitized is the timezone for CreateDate
Six separate tags.

You can set them if you like, but as your target use is Google photos, it won't help.  Google photos seems to ignore any and all actual embedded time zone metadata and does something weird.  I haven't looked into it lately, having given up on it when I initially tried.  I have no advice on this as I feel strongly about having correct data in the file and not altering it because Google can't be bothered to properly deal with metadata.

QuoteWould I use the exiftool '-timezone=00:00' command to achieve this (replacing 00:00 with the appropriate offset).

I only just noticed this in your original command.  There is no TimeZone tag.  As you can see in your output, there's only dashes where the timezone data would be.

Depending upon the tag, some will include the time zone in the tag, some won't (see first paragraph of FAQ #5).  EXIF don't allow for it, it has to be set separately as detailed above. XMP usually does allow for it.  But as I said, Google photos will ignore it.
* 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).