From 84fca7e6aeb5ae03dcb1d718a5c6bc63b9d50b7e Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Mon, 3 Feb 2003 15:57:30 +0000 Subject: [PATCH] fix dat dagen altijd 2 chars moeten zijn --- mycp/mycp | 1 + 1 file changed, 1 insertion(+) diff --git a/mycp/mycp b/mycp/mycp index e5ac5b2..e901635 100755 --- a/mycp/mycp +++ b/mycp/mycp @@ -36,6 +36,7 @@ sub backup($) { @stat = stat($file); @timestamp = localtime($stat[9]); $timestamp[5] += 1900; + if ( length($timestamp[3]) < 2 ) { $timestamp[3] = "0$timestamp[3]"; } $sfx = "$timestamp[3]$months[$timestamp[4]]$timestamp[5]"; unless ( -d "$dir/OLD" ) { mkdir "$dir/OLD", 0777 or die "Couldn't create $dir/OLD: $!\n"; } $backup = "$dir/OLD/$base.$sfx";