From 7980020d2bd3a5402cc52fbddd3bb2072457d251 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 9 Mar 2004 13:40:57 +0000 Subject: (the_time) simplify --- perl-install/standalone/drakbackup | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 92ff537ea..588236607 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -282,20 +282,8 @@ sub all_user_list() { } sub the_time() { - $the_time = "_"; - my ($sec, $min, $hour, $day, $month, $year) = localtime(time()); - $the_time .= $year + 1900; - if ($month < 9) { $the_time .= "0" } - $the_time .= $month + 1; - if ($day < 10) { $the_time .= "0" } - $the_time .= $day; - $the_time .= "_"; - if ($hour < 10) { $the_time .= "0" } - $the_time .= $hour; - if ($min < 10) { $the_time .= "0" } - $the_time .= $min; - if ($sec < 10) { $the_time .= "0" } - $the_time .= $sec; + my ($sec, $min, $hour, $day, $month, $year) = localtime(time()); + sprintf("_%d%02d%02d_%02d%02d%02d", $year + 1900, $month + 1, $day, $hour, $min, $sec); } sub get_tape_info() { -- cgit v1.2.1