drewnoakes / metadata-extractor-dotnet

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for ISO8601 date time format in iPhone QuickTime files

michafrank opened this issue · comments

The QuickTime .mov files produced by my iPhone use the ISO8601 format in the QuickTime Metadata Header, e.g. 2019-12-24T22:35:06+0100.

This format is not supported by the TryGetDateTime() extension function (in class DirectoryExtensions).

The date can be parsed with this custom date and time format string: yyyy-MM-ddTHH:mm:sszzz.

I propose to add this format string to the private list of formats in string[] _datePatterns which is used by the TryGetDateTime() function.

Thanks a lot for this great library!

Sounds good. Can you submit a pull request?

If you're able to submit a sample file, it'd be great. Ideally something small (<1 sec of darkness should be fine).

There is already a file with this kind of metadata, see
https://github.com/drewnoakes/metadata-extractor-images/blob/master/mov/metadata/dotnet/with-gps.mov.txt

[QuickTime Metadata Header - 0x0007] Creation Date = 2019-07-24T11:25:40+0300

#260 is merged, but the output for that MOV file is the same. The descriptor needs to be updated to interpret that field as a date. Currently it's just printing the directory's string verbatim.