zmfilter.pl errors running filter

Support and queries relating to all previous versions of ZoneMinder
Locked
qwe10730
Posts: 13
Joined: Thu Jan 22, 2004 2:34 pm

zmfilter.pl errors running filter

Post by qwe10730 »

Hi,

I have a filter that I have defined to delete old events. It's not the only filter and I now have the filters working correctly. However when zmfilter tries to run this filter automatically I get errors in the log file:

Use of uninitialized value in localtime at /usr/local/bin/zmfilter.pl line 141.
Use of uninitialized value in localtime at /usr/local/bin/zmfilter.pl line 141.

Looking at zmfilter.pl, line 141 is

return( localtime(UnixDate( $date_str, '%s' )) );

I take it that this implies that $date_str is unset.

What am I doing wrong?

Russell.
User avatar
fernando
Posts: 240
Joined: Thu Jul 10, 2003 6:00 pm

Re: zmfilter.pl errors running filter

Post by fernando »

ahaaaaaaaaa......

so iam not crazy. :)
i get same error sinse 0.9.16...
i still dont have any idea how to fix it..

http://www.zoneminder.com/forum_general ... 116e2a48ba
http://www.zoneminder.com/forum_general ... afd52d9275

and this problem has came sinse this..
http://www.zoneminder.com/forum_general ... f75d453fe2
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: zmfilter.pl errors running filter

Post by zoneminder »

Did you try my last suggestion Fernando? Did it make any difference?

Phil,
User avatar
fernando
Posts: 240
Joined: Thu Jul 10, 2003 6:00 pm

Re: zmfilter.pl errors running filter

Post by fernando »

mmm i did't get your suggestion!

what was it..?


iam interesting in get Ross Melin mandrake live cd. so i can test a diferent scenario.
http://www.zoneminder.com/forum_install ... 8c8910996b

do you have it? you will put it on the web?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: zmfilter.pl errors running filter

Post by zoneminder »

He is posting it to me. Once I get it I will put it up. We did try once before but I couldn't get the ISO off the CD properly so this is our second go.

The suggestion I made about your filter problems (a couple of weeks ago) was just

"Can you change your filter to use '-1 hour' instead of 'last hour' and see if that makes any difference."

Did you try that?

Phil,
User avatar
fernando
Posts: 240
Joined: Thu Jul 10, 2003 6:00 pm

Re: zmfilter.pl errors running filter

Post by fernando »

yes... semms to run ok. i cant.. use -1 hour works..
were you tell this? how did i miss that?

well... i will tell you if some new bug is found.
qwe10730
Posts: 13
Joined: Thu Jan 22, 2004 2:34 pm

Re: zmfilter.pl errors running filter

Post by qwe10730 »

I changed the filter from using last day to using -1 day and it now works. Thanks Phil.

What puzzles me though is that the filter works fine when run via the web interface but not when run automatically. i guess this is the difference between the Perl and PHP date formats.

Russell.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: zmfilter.pl errors running filter

Post by zoneminder »

Yes Russell. You are correct. The web pages use strtotime to parse date/times while the perl functions use UnixDate from the Date::Manip package. They are quite similar but obviously have some subtle differences. I've made a note to see if I can put a more useful error message into zmfilter to indicate this.

Phil,
Locked