ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: tin_can on August 13, 2012, 05:36:58 PM

Title: Incorrect Create Date / Modify Date
Post by: tin_can on August 13, 2012, 05:36:58 PM
I took some video today with a HTC Incredible 2 cell phone and ExifTool 8.99 is reporting the year as 1946 instead of 2012. The month, day, and time are correct, though.

I'm running ExifTool on an Ubuntu 12.04, 64-bit desktop, but experience the same problem using the 32-bit desktop.
Title: Re: Incorrect Create Date / Modify Date
Post by: Phil Harvey on August 14, 2012, 07:46:32 AM
Interesting.  Could you email me a sample so I can take a look? (philharvey66 at gmail.com)

Thanks.
Title: Re: Incorrect Create Date / Modify Date
Post by: tin_can on August 14, 2012, 10:49:39 AM
Will do. You should have it in a couple of minutes.

Thanks.
Title: Re: Incorrect Create Date / Modify Date
Post by: Phil Harvey on August 14, 2012, 11:15:23 AM
Thanks for the sample.

I believe ExifTool is decoding this correctly and that this is a bug in the way HTC writes the date/time values.  It is writing the dates based on 1970 as time zero, but the QuickTime specification uses 1904 as time zero.  As a result, the date is wrong by 66 years.  Also, there may be a problem with dates in some leap years.

- Phil
Title: Re: Incorrect Create Date / Modify Date
Post by: bmcwilliams on December 11, 2015, 06:28:58 PM
I just encountered this same problem.  I know this is an old thread, but this was the closest post that came up when Googling the problem, and I want future users to be able to find this solution. 

Problem:  My HTC phone, up until Jan 1, 2014, suffered from this bug where the date zero was incorrect for .mp4 video files.  I never noticed a problem on the phone because it seemingly corrected it.  (Videos created from Jan 1, 2014 onward did not have this problem, so they must have fixed it around then.)

Manifestation:  Recently, I switched to an iPhone, and iOS showed all of my HTC created videos prior to 2014 as having a date 66 years before the correct date (e.g. 1947-10-31 instead of 2013-10-31).  So the videos weren't correctly sorted with the associates photos taken the same dates.

EXIFTool showed the dates correctly, but it gave the warning: "Warning : [minor] Patched incorrect time zero for QuickTime date/time tag"  EXIFTool was working around the issue without correcting it.  Unfortunately, iOS would not work around the issue.

FIX:  EXIFTool was able to correct the date zero.  I ran the command (windows version):
>exiftool.exe "-time:all+=0::" C:\directory\*

Basically telling EXIFTool to time shift all dates by 0 years.  After running this command, the dates appeared unchanged in EXIFTool, the warning went away, and iOS was able to distinguish the dates correctly and sort my videos properly.
Title: Re: Incorrect Create Date / Modify Date
Post by: Phil Harvey on December 14, 2015, 07:42:02 AM
Nice.  Thanks for the post.

The patch to handle incorrectly written QuickTime date/time values was added in version 9.25 (Apr. 6, 2013).

Aside: Recently there was someone (read here (https://exiftool.org/forum/index.php/topic,6884.0.html)) who wanted date/time values before 1970, which are specifically disallowed by this patch.  So with version 10.08 (to be released soon) the patch will be disabled if you use the QuickTimeUTC option.

- Phil