From 0355be7101baf8fdb5f7219b45bf2f198bb2b7da Mon Sep 17 00:00:00 2001 From: Stew Benedict Date: Fri, 23 Jan 2004 13:35:29 +0000 Subject: Rework timestamp for backup files to please perl_checker. --- perl-install/standalone/drakbackup | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'perl-install/standalone/drakbackup') diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index c8ee648af..c9cd56210 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -25,7 +25,6 @@ use strict; use interactive; use common; -use Time::localtime; use detect_devices; # Backend Options. @@ -337,18 +336,19 @@ sub all_user_list() { sub the_time() { $the_time = "_"; - $the_time .= localtime->year + 1900; - if (localtime->mon < 9) { $the_time .= "0" } - $the_time .= localtime->mon + 1; - if (localtime->mday < 10) { $the_time .= "0" } - $the_time .= localtime->mday; + 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 (localtime->hour < 10) { $the_time .= "0" } - $the_time .= localtime->hour; - if (localtime->min < 10) { $the_time .= "0" } - $the_time .= localtime->min; - if (localtime->sec < 10) { $the_time .= "0" } - $the_time .= localtime->sec; + 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; } sub get_tape_info() { -- cgit v1.2.1