Find Events that happen overnight

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
FSAB
Posts: 8
Joined: Thu Sep 14, 2017 10:27 am

Find Events that happen overnight

Post by FSAB »

I'm trying to build a background filter that catches small events overnight such as camera IR and lighting changes that get around my preclusive filters, but I can't work out how to find events within a time period of (for example) 9PM and 5AM, across all days.

Setting a Start Time >= 21:00:00 and End Time <= 05:00:00 doesn't work, so does anyone have any ideas?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Find Events that happen overnight

Post by Magic919 »

Try those with -15 hour and -7 hour. (tweak to suit.)
-
mikb
Posts: 585
Joined: Mon Mar 25, 2013 12:34 pm

Re: Find Events that happen overnight

Post by mikb »

FSAB wrote: Tue Dec 06, 2022 9:48 am I'm trying to build a background filter that catches small events overnight such as camera IR and lighting changes that get around my preclusive filters, but I can't work out how to find events within a time period of (for example) 9PM and 5AM, across all days.

Setting a Start Time >= 21:00:00 and End Time <= 05:00:00 doesn't work, so does anyone have any ideas?
I suspect you've fallen into a "common sense English" vs "logic English" trap there.

There *is* no time of day that is more than 21:00 AND less than 05:00 :)

Name a number more than 21, but less than 5 ?

You might get away with Start Time >= 21:00:00 OR End Time <= 05:00:00 -- if it will let you do that -- that's logical (even though it won't accumlate overnight in the way you might intend -- 5 early hours of THIS morning, and 3 of THIS evening, missing out the day in the middle).
haus
Posts: 213
Joined: Thu Oct 11, 2007 5:10 am

Re: Find Events that happen overnight

Post by haus »

I have a filter like this.

( End Time - Less Than - 5:00:00
OR End Time - Greater Than - 23:00:00 )
AND End Date/Time - Greater Than - 24 hours ago
AND Cause - Not Equal To - Continuous
AND (Monitor Name - equal to - A
OR Monitor Name - equal to - B )
etc - I have one line for each outdoor camera

The first three lines are most relevant but I added the rest in case it helps.
FSAB
Posts: 8
Joined: Thu Sep 14, 2017 10:27 am

Re: Find Events that happen overnight

Post by FSAB »

mikb wrote: Tue Dec 06, 2022 6:27 pm I suspect you've fallen into a "common sense English" vs "logic English" trap there.

There *is* no time of day that is more than 21:00 AND less than 05:00 :)

Name a number more than 21, but less than 5 ?

You might get away with Start Time >= 21:00:00 OR End Time <= 05:00:00 -- if it will let you do that -- that's logical (even though it won't accumlate overnight in the way you might intend -- 5 early hours of THIS morning, and 3 of THIS evening, missing out the day in the middle).
I'm perfectly aware of how timestamps work :P

I just assumed ZM either stored actual dates and times against events *or* did some processing of filter queries that looked at separate time and date values because said options were available in the search filters.
FSAB
Posts: 8
Joined: Thu Sep 14, 2017 10:27 am

Re: Find Events that happen overnight

Post by FSAB »

haus wrote: Thu Dec 08, 2022 4:10 pm I have a filter like this.

( End Time - Less Than - 5:00:00
OR End Time - Greater Than - 23:00:00 )
AND End Date/Time - Greater Than - 24 hours ago
AND Cause - Not Equal To - Continuous
AND (Monitor Name - equal to - A
OR Monitor Name - equal to - B )
etc - I have one line for each outdoor camera

The first three lines are most relevant but I added the rest in case it helps.
Excellent, it was this bit that worked - not sure why I didn't think of it before! :)

Code: Select all

( End Time - Less Than - 5:00:00
OR End Time - Greater Than - 23:00:00 )
heathcote
Posts: 2
Joined: Mon Jun 26, 2023 7:35 am

Re: Find Events that happen overnight

Post by heathcote »

When it comes to time stamps, I'm an expert.

I'm assuming that ZM either maintains the precise time and date of the event, or processes the filter query by inspecting each individual date and time value, as detailed in the Find Filters interface.
Last edited by heathcote on Wed Jul 05, 2023 4:01 am, edited 1 time in total.
Post Reply