Skip to main content
johnrellis
Legend
July 25, 2011

P: "Capture Date is in the last n hours" doesn't work

  • July 25, 2011
  • 14 replies
  • 868 views

In Smart Collections, the rule "Capture Date is in the last n hours" doesn't work. It appears to behave as "Capture Date is today". Here's a screenshot:


Image is not available



LR 3.4, Windows 7

This topic has been closed for replies.

14 replies

Inspiring
August 17, 2011
Ben, I don't want to waste your precious time, but I'm very puzzled to repeatedly hear about different behaviour between the Mac and Win versions.

By now, I've seen many examples where code that could be shared between the Mac and Win versions because it is sufficiently detached from both hardware and OS, is not shared.

We often hear that the LR team is small, so why is shareable code not shared? It also questions the choice of a portable programming environment (Lua), does it not?

Sorry for this off-topic question, but I'm really curious about the reason behind the many differences in Mac vs Win code.
johnrellis
Legend
August 17, 2011
Good, thanks.
Participating Frequently
August 17, 2011
Hi John,

I have reproduced this problem, and have entered the issue in our bug database. Interestingly, the behavior is different on Mac and Win (wrong on both though :-)).

Thanks,
Ben
Known Participant
July 26, 2011
I tried to to go into the details of this: The "is in the last n hours" rule seems to work as follows: The specified number of hours are subtracted from the current date and time. The resulting date (without time) A is compared to the capture date (again, without time) B of the photos and if B is greater than or equal to A, the photo appears in the smart collection.

I guess it's a simple programming error: The final comparison is done using dates without time (as it is done for the "is in the last n days/weeks/etc" rules), whereas it should have been compared as date plus time (possibly with 1-hour-"granularity" *)) for this particular rule.

*) with granularity I mean the following: If the current time is 16:20, the rule "is in the last 1 hours" shows photos captured from 15:00...16:20 and the rule "is in the last 2 hours" shows photos captured from 14:00...16:20 - same logic as in the "last n days" rule. It's purely a matter of taste whether this granularity or a comparison exact to the second is used.