From: Eric Bollengier Date: Thu, 22 Apr 2010 16:28:02 +0000 (+0200) Subject: regress: Add function to compute ISO time in future X-Git-Tag: Release-7.0.0~1887 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e23aa5bf221b3b3e953ebbb3c11a91094c2e9c74;p=bacula%2Fbacula regress: Add function to compute ISO time in future --- 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;