Filter by date/time shows one wrong result per day

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
passt
Posts: 14
Joined: Wed Mar 19, 2008 7:53 am
Location: Germany

Filter by date/time shows one wrong result per day

Post by passt »

Hi everybody,
I want to filter events from Mo to Fr and from 8:00 to 15:30 - see my filter in [Bildschirmfoto vom 2019-01-31 16-24-25.png]. The result works as expected, but it shows one additional event which is outside my filters - see an example in [Bildschirmfoto vom 2019-01-31 16-28-13.png].

Can you explain? Is this a bug?

Peter
Attachments
Bildschirmfoto vom 2019-01-31 16-28-13.png
Bildschirmfoto vom 2019-01-31 16-28-13.png (34.15 KiB) Viewed 1318 times
Bildschirmfoto vom 2019-01-31 16-24-25.png
Bildschirmfoto vom 2019-01-31 16-24-25.png (32.47 KiB) Viewed 1318 times
mikb
Posts: 600
Joined: Mon Mar 25, 2013 12:34 pm

Re: Filter by date/time shows one wrong result per day

Post by mikb »

If you mean the first event in the list, around midnight, then it is exactly what you asked for.

It's just not what you meant to ask for ;)

Start: 01/28 23:50 (Monday) End: 01/29 00:00:00 (Tuesday)

Think about each filter line ...

Starts on Monday or later. Yes.
Ends on Friday or less. Yes.
Starts at 08:00 or more (yes, by 16 hours)
Ends at 15:30 or less (yes, by 15.5 hours).

So ... it's working as unintended.

You may need to tweak your logic, the brackets don't help, as (True and true) and (true and true) is going to come up "true" no matter how you slice it.

It's because the event straddles midnight, you're seeing an "edge case" that usually slips by in testing, and then bites people when systems go into use, if the event ended at 23:59:59 Monday, this wouldn't be happening (Ends at 15:30 or less: NO!)
passt
Posts: 14
Joined: Wed Mar 19, 2008 7:53 am
Location: Germany

Re: Filter by date/time shows one wrong result per day

Post by passt »

Thanks that did the trick.
Post Reply