From e23aa5bf221b3b3e953ebbb3c11a91094c2e9c74 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 22 Apr 2010 18:28:02 +0200 Subject: [PATCH] regress: Add function to compute ISO time in future --- regress/scripts/functions.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm index 23b5d7fea5..76a8fb007c 100644 --- a/regress/scripts/functions.pm +++ b/regress/scripts/functions.pm @@ -40,7 +40,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(update_some_files create_many_files check_multiple_copies update_client $HOST $BASEPORT add_to_backup_list check_volume_size create_many_dirs cleanup start_bacula stop_bacula get_resource - set_maximum_concurent_jobs + set_maximum_concurent_jobs get_time check_min_volume_size check_max_volume_size $estat $bstat $rstat $zstat $cwd $bin $scripts $conf $rscripts $tmp $working extract_resource $db_name $db_user $db_password $src $tmpsrc); @@ -443,4 +443,11 @@ sub check_multiple_copies exit $ret; } +use POSIX qw/strftime/; +sub get_time +{ + my ($sec) = @_; + print strftime('%F %T', localtime(time+$sec)), "\n"; +} + 1; -- 2.39.5