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-5.2.1~1422 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b5dff2b6767a5d48c38f2a70a69b0f737d7d5cbe;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;