Spotlight $time searches produce incorrect results
| Originator: | pierre.bernard | ||
| Number: | rdar://19511921 | Date Originated: | |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | OS X 10.10.1 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Date searches using the Spotlight $time query operators produce incorrect results. This problem can be reproduced using Finder. I.e. Finder searches and smart folder show incorrect results. Steps to Reproduce: Create a Spotlight query expression involving $time.now, $time.today or $time.iso. Run the query using MDQueryRef or mdfind. Expected Results: Examples: mdfind 'kMDItemContentModificationDate >= "$time.today"' Should find only items modified today. Actual Results: In the CET time zone (currently 1 hour ahead of GMT), the above query shows files from today as well as files modified after 11PM yesterday. When I set my Mac to a time zone further ahead of GMT, I get more files. When I set my Mac to a time zone behind GMT, I get fewer or no results. Searches using $time.iso similarly produce incorrect results. Searches using NSTimeInterval values produce the correct results.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!