erez_birenzwig's profile

3 Messages

 • 

120 Points

Sat, Jul 30, 2011 10:02 PM

Lightroom: Problems creating Smart Collection filtered by months and capture date

Filtering a smart collection by "Capture Date" and Months sometimes doesn't work. I have a smart collection filtering by "captured in the last 5 months but not in the last 4 months" and I get almost all of the pictures in my catalogue in the collection.

I'm using LR3.4.1

Responses

Official Solution

Adobe Administrator

 • 

15.9K Messages

 • 

296.4K Points

4 y ago

This issue is solved in Lightroom 4 and later.

Sr. Product Manager, Adobe Digital Imaging

130 Messages

 • 

2.1K Points

10 y ago

Somewhat bizarrely, the problem seems to be with the '5 months' element of the smart collection. If I create a simple smart collection with "Capture date is in the last n months", it works perfectly correctly for all values of n apart from 5! When n=5 the result is the same total as 'All Photographs'.

Win7 64bit, LR 3.4.1

427 Messages

 • 

7.7K Points

10 y ago

Seems to happen for 1, 3, 5, 8, 10, 13, 15, 17... Months. This is funny. By the way: The "is NOT in the last X months" has the same bug, but only negated, i.e. it will show no photos at all for these special values.

P.S. Bug seems to affect the rules for the modify date, too.
P.S. II. I use LR 3.4.1 WinXP SP3 32Bit.
P.S. III: Just a little detail: "Capture date is in the last X months" does not show photos that have no capture date in the metadata. The special values are no exception to this rule. So it seems to be an effect that sets the date to compare to somewhere very far into the past.

3 Messages

 • 

120 Points

10 y ago

Thanks for the confirmation, I thought I was going crazy :)

I'm using weeks in the mean time, but it's not the same...

Champion

 • 

5.9K Messages

 • 

102.3K Points

10 y ago

On my system, the problem happens with 5, 17, 29, 41, and 53 months (the current date is 7/30/2011). But if I set my computer's clock to be 7/31/2011, then it happens with 1, 3, 5, and 8 months.

I believe the bug arises from the way LR is computing the beginning date. It takes today's date in year, month, and day format and simply subtracts the number of months, forming the beginning date, without checking that the date is valid. For example, today's date is 7/30/2011; given "in the last 5 months", it constructs the beginning date as 2/30/2011, which isn't valid. It tries to convert that invalid date to internal form, and the conversion routine returns -1 as an error value. LR doesn't check for the error value, and -1 gets interpreted as the earliest possible date.

The correct method would be to set the day portion of the beginning date to the minimum of the day and the maximum number of days in the month.

Working with dates and calendars is much harder than it seems, and programmers often get it wrong.

3 Messages

 • 

120 Points

So basically this problem occurs 1-3 days a month... Funny I never noticed it before.

It'll be fixed by itself tomorrow.

Thanks!

427 Messages

 • 

7.7K Points

Ok, this makes sense. I testet at the 31th and got 1, 3, 5, 8, etc. When I set the PCs clock to tomorrow, the problems are gone.

Champion

 • 

221 Messages

 • 

4.1K Points

10 y ago

What an unusual bug!! Good catch........

230 Messages

 • 

4K Points

10 y ago

This is a known and accepted bug and has been there since LR2.7 (or even before, which I cannot test).

Beat

427 Messages

 • 

7.7K Points

Yes, the bug seems to date back at least to 2.3 (http://forums.adobe.com/thread/441298 ), but curiously it seems to have had the opposite effect in 2.x, e.g. "last 3 month" showed no photos at all on the critical dates. So the bug persisted, and only the error handling for the invalid date seems to have changed in 3.x.

Ok, doesn't really matter, more important is to know that currently one should avoid the unit "months" (and "hours", see http://feedback.photoshop.com/photosh... ).

Employee

 • 

478 Messages

 • 

10.7K Points

10 y ago

Hi Erez,

Scratch my previous comment (now deleted). I am able to confirm that the bug occurs (on Windows only) and have also confirmed that it has been previously entered in our bug database.

Thanks,
Ben