projects
/
BackupPC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e7cdff
)
increase to timestamp until end of day
hospira
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 20 May 2011 16:36:00 +0000
(18:36 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 20 May 2011 16:36:00 +0000
(18:36 +0200)
lib/BackupPC/Search.pm
patch
|
blob
|
history
diff --git
a/lib/BackupPC/Search.pm
b/lib/BackupPC/Search.pm
index
1c3007f
..
3783c55
100644
(file)
--- a/
lib/BackupPC/Search.pm
+++ b/
lib/BackupPC/Search.pm
@@
-104,6
+104,12
@@
sub dates_from_form($) {
$dt -= DateTime::Duration->new( days => 1 );
}
+ if ( $suffix eq 'to' ) {
+ # to end of day
+ $dt += DateTime::Duration->new( days => 1 );
+ $dt -= DateTime::Duration->new( seconds => 1 );
+ }
+
print STDERR "mk_epoch_date($name,$suffix) [$yyyy-$mm-$dd] = " . $dt->ymd . " " . $dt->hms . "\n";
return $dt->epoch || 'NULL';
}