Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateDate tag date format #66

Open
nikolanedic opened this issue Oct 25, 2017 · 0 comments
Open

CreateDate tag date format #66

nikolanedic opened this issue Oct 25, 2017 · 0 comments

Comments

@nikolanedic
Copy link

I'm using your script with Exiftool adapter and I'm getting a fatal error in PHPExif\Exif.php on line 698 (public function setCreationDate(\DateTime $value)) since bool is passed to a function and it's type-hinted to receive a DateTime object, but I'm getting this error only for some images. I dig around a bit and I realized that some images had date format of 'Y:m:d H:i:s' and others had 'Y:m:d H:i:sP'. I fixed it by extending a mapper (PHPExif\Mapper\Exiftool) class and skipped CreateDate key if a value is not an instance of DateTime, but maybe it should parse that date regardless of format since it's readable by exiftool so I assume it is a valid value for that tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants