Ok, I have a breakthrough. It turns out that it has to do with a time difference between probably the database and zoneminder or something. I was testing with filters of greater than 1 minute and 1 hour ago, but this didn't trigger any events.
Now I tested with a filter of events greater than 3 hours ago and see me results. I executed the filter at 12:00 local time and see what SQL is executed:
Code: Select all
10/01/17 12:40:20.647789 zmfilter[9783].INF [Scanning for events using filter '_TempFilter1506854418']
10/01/17 12:40:20.678227 zmfilter[9783].DBG [Reloading filters]
10/01/17 12:40:20.678937 zmfilter[9783].DBG [Found filter '_TempFilter1506854418']
10/01/17 12:40:20.892509 zmfilter[9783].DBG [SQL:SELECT E.*,
unix_timestamp(E.StartTime) as Time,
M.Name as MonitorName,
M.DefaultRate,
M.DefaultScale
FROM Events as E
INNER JOIN Monitors as M on M.Id = E.MonitorId
where not isnull(E.EndTime) and ( E.StartTime > '[b]2017-10-01 11:40:20[/b]' ) and ( E.Emailed = 0 ) order by E.StartTime asc]
10/01/17 12:40:20.892616 zmfilter[9783].DBG [Got 1 filters]
10/01/17 12:40:20.892655 zmfilter[9783].DBG [Checking filter '_TempFilter1506854418', email]
10/01/17 12:40:20.893290 zmfilter[9783].DBG [Checking event 2571]
10/01/17 12:40:20.893385 zmfilter[9783].INF [Creating notification email]
10/01/17 12:40:21.261688 zmfilter[9783].INF [Sending notification email 'ZoneMinder: Alarm - Garage-2571 (255 - 255 75)']
10/01/17 12:40:21.475982 zmfilter[9783].INF [Attaching '/usr/share/zoneminder/www/events/3/17/10/01/12/39/36/00026-capture.jpg]
10/01/17 12:40:35.705408 zmfilter[9783].INF [Notification email sent]
So I suppose that means the time used for creating the SQL was 14:40 at the time of execution.
Does anyone know how to proceed?
I have checked the mysql database and did a SQL-statement for the current time and the result of that was the correct time. And I've checked the variable TIME_ZONE and this is set to "SYSTEM". This is all rather new to me so I'm kind of freewheeling at the moment.
BTW I also checked the system date/time of the docker and that was correct also.