Please fall back to CreateDate when DateTimeOriginal not available

mattdm

Joined: 2005-07-22
Posts: 181
Posted: Fri, 2012-08-03 00:59

A number of my files have CreateDate set but not DateTimeOriginal.

In this case, I think it would be sensible to fall back to setting the item's "Captured" value to "CreateDate" rather than leaving it empty.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2012-08-03 13:39

for a temp measure this could be done via an sql query...

UPDATE items SET captured = created WHERE captured IS NULL

however, I agree with your request. Editing the class for Item_Module_Core in gallery/modules/gallery/models/item.php near the $this->blah's lines and adding $this->captured = time(); would suffice I think, as I think the captured date is set via the exif module after image created. (This is just quick thinking though

-OR- perhaps editing the exif module to copy over the created date if no captured date is set... (assuming you're using the exif module)