68 |
$mm =~ s/\D//g; |
$mm =~ s/\D//g; |
69 |
$dd =~ s/\D//g; |
$dd =~ s/\D//g; |
70 |
|
|
71 |
|
my $h = my $m = my $s = 0; |
72 |
|
if ($suffix eq 'to') { |
73 |
|
$h = 23; |
74 |
|
$m = 59; |
75 |
|
$s = 59; |
76 |
|
} |
77 |
|
|
78 |
my $dt = new DateTime( |
my $dt = new DateTime( |
79 |
year => $yyyy, |
year => $yyyy, |
80 |
month => $mm, |
month => $mm, |
81 |
day => $dd |
day => $dd, |
82 |
|
hour => $h, |
83 |
|
minute => $m, |
84 |
|
second => $s, |
85 |
); |
); |
86 |
print STDERR "mk_epoch_date($name,$suffix) [$yyyy-$mm-$dd] = " . $dt->ymd . " " . $dt->hms . "\n"; |
print STDERR "mk_epoch_date($name,$suffix) [$yyyy-$mm-$dd] = " . $dt->ymd . " " . $dt->hms . "\n"; |
87 |
return $dt->epoch || 'NULL'; |
return $dt->epoch || 'NULL'; |
110 |
push @conditions, qq{ files.date >= $files_from } if ($files_from); |
push @conditions, qq{ files.date >= $files_from } if ($files_from); |
111 |
push @conditions, qq{ files.date <= $files_to } if ($files_to); |
push @conditions, qq{ files.date <= $files_to } if ($files_to); |
112 |
|
|
113 |
print STDERR "backup: $backup_from - $backup_to files: $files_from - $files_to cond:" . join(" | ",@conditions); |
print STDERR "backup: $backup_from - $backup_to files: $files_from - $files_to cond:" . join(" and ",@conditions); |
114 |
|
|
115 |
push( @conditions, ' files.shareid = ' . $param->{'search_share'} ) if ($param->{'search_share'}); |
push( @conditions, ' files.shareid = ' . $param->{'search_share'} ) if ($param->{'search_share'}); |
116 |
push (@conditions, " upper(files.path) LIKE upper('%".$param->{'search_filename'}."%')") if ($param->{'search_filename'}); |
push (@conditions, " upper(files.path) LIKE upper('%".$param->{'search_filename'}."%')") if ($param->{'search_filename'}); |