summaryrefslogtreecommitdiffstats
path: root/lib/App/BorgRestore.pm
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-02 21:35:57 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-02 22:31:49 +0200
commit0d24899b78307e33d72a693d33178343069187dd (patch)
tree7d595561cade0f4f8557edf12a754cb23ddf2932 /lib/App/BorgRestore.pm
parent9b9bf92e5f83102742036aa98a4c6c73f758c302 (diff)
downloadApp-BorgRestore-0d24899b78307e33d72a693d33178343069187dd.tar.gz
App-BorgRestore-0d24899b78307e33d72a693d33178343069187dd.tar.xz
Move format_timestamp to Helper
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/BorgRestore.pm')
-rw-r--r--lib/App/BorgRestore.pm11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm
index c300a0b..218be49 100644
--- a/lib/App/BorgRestore.pm
+++ b/lib/App/BorgRestore.pm
@@ -179,11 +179,11 @@ sub select_archive_timespec {
my $target_timestamp = time - $seconds;
- $log->debugf("Searching for newest archive that contains a copy before %s", $self->format_timestamp($target_timestamp));
+ $log->debugf("Searching for newest archive that contains a copy before %s", App::BorgRestore::Helper::format_timestamp($target_timestamp));
for my $archive (reverse @$archives) {
if ($archive->{modification_time} < $target_timestamp) {
- $log->debugf("Found archive with timestamp %s", $self->format_timestamp($archive->{modification_time}));
+ $log->debugf("Found archive with timestamp %s", App::BorgRestore::Helper::format_timestamp($archive->{modification_time}));
return $archive;
}
}
@@ -191,13 +191,6 @@ sub select_archive_timespec {
die "Failed to find archive matching time specification\n";
}
-sub format_timestamp {
- my $self = shift;
- my $timestamp = shift;
-
- return POSIX::strftime "%a. %F %H:%M:%S %z", localtime $timestamp;
-}
-
sub _timespec_to_seconds {
my $self = shift;
my $timespec = shift;