Fixed date time filter problem and handles missing shared memory better.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@634 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-09-23 09:49:19 +00:00
parent 1ceb9cc9b7
commit 8ffd642e06
1 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ Parameters are :-
sub strtotime sub strtotime
{ {
my $date_str = shift; my $date_str = shift;
return( UnixDate( $date_str, '%s' ) ); return( localtime(UnixDate( $date_str, '%s' )) );
} }
# #
@ -199,7 +199,7 @@ my $shmid = shmget( $key, $size, 0 ) || die( "Can't get shared memory id: $!" );
while( 1 ) while( 1 )
{ {
next if ( !shmread( $shmid, $last_event_id, 24, 4 ) ); shmread( $shmid, $last_event_id, 24, 4 ) or die( "Can't read from shared memory: $!" );
$last_event_id = unpack( "l", $last_event_id ); $last_event_id = unpack( "l", $last_event_id );