my $tmp_dir = "$dest_dir/$db";
$tmp_dir = $dest_dir if (!$report_per_database);
&logmsg('LOG', "Ok, generating HTML daily report into $tmp_dir/$bpath/...");
--
# set path and create subdirectories
mkdir("$tmp_dir") if (!-d "$tmp_dir");
if ($bpath =~ m#^(\d+)/(\d+)/(\d+)#) {
$found = 1;
last;
}
- }
- return 1 if ($found);
- }
+ }
++ return 1 if ( $found );
++ }
+ # check begin or end time without the date
+ # and extract the hour here, late, to get the timezone
+ # already applied
+ if ( $from_hour || $to_hour ){
+ $prefix_vars{'t_time'} = $prefix_vars{'t_timestamp'};
+ $prefix_vars{'t_time'} =~ s/^(\d{4})-(\d{2})-(\d{2}) //;
- return 1 if ($from && ($from gt $prefix_vars{'t_timestamp'}));
-
- if ($to && ($to lt $prefix_vars{'t_timestamp'})) {
- return -1;
- }
+ return 1 if ( $from_hour && ( $from_hour gt $prefix_vars{'t_time'} ) );
+ return -1 if ( $to_hour && ( $to_hour lt $prefix_vars{'t_time'} ) );
+ }
+ # check against date/timestamp
+ return 1 if ($from && ($from gt $prefix_vars{'t_timestamp'}));
+ return -1 if ($to && ($to lt $prefix_vars{'t_timestamp'}));
return 0;
}