Almost all my files now have a null kMDItemDateAdded field:

$ mdls -name kMDItemFSName -name kMDItemDateAdded 2014-01-14-1500595479_04-EVN.PDF
kMDItemDateAdded = (null)
kMDItemFSName    = "2014-01-14-1500595479_04-EVN.PDF"

How could it happen? What do I need to do to restore it?

  • This seems to be a Yosemite bug, I've had iCloud files revert to 2001 because of this. Did you install 10.10.1?
    – unom
    Nov 24 '14 at 11:11
  • I'm still on 10.10. Do you think 10.10.1 would fix it?
    – chrkv
    Nov 24 '14 at 11:24
  • Suddenly I realized that I have tried turning off spotlight like mentioned here [apple.stackexchange.com/questions/144474/… and may be I have turned it back on only after couple of days.
    – chrkv
    Nov 24 '14 at 11:29
  • I think so, I haven't seen the iCloud issue after the update. The bug is actually in Finder on the MAC. I think it happen system wide but I never noticed it until I opened something from iCloud, I have "sort by date added" on that and every time I opened a file it went back to 2001.
    – unom
    Nov 24 '14 at 11:45

I don't think its a bug. An update in Apples mdimport schema will cause this. I checked this file /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd on OSX 10.6.8 and OSX 10.9 and found kMDItemDateAdded only in 10.9.

When your mdworker will update your existing Meta Data using the new schema, it will fill kMDItemDateAdded with null, because PDF.mdimporter is not taking care of this attribute. How should the pdf know, when it is added?

If your mds is consuming lots of CPU time ou should re-index your Spotlight Database like mentioned here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .