]> dxcluster.net Git - spider.git/commitdiff
forgot to write this away
authordjk <djk>
Sat, 30 Jan 1999 20:01:42 +0000 (20:01 +0000)
committerdjk <djk>
Sat, 30 Jan 1999 20:01:42 +0000 (20:01 +0000)
perl/DXUtil.pm

index 994cdd981a735c4753aeedbedac8c46d08b1ea82..f5263a271f55d20d9fd49b811bf389ff0d03ec3b 100644 (file)
@@ -64,8 +64,11 @@ sub cltounix
 {
        my $date = shift;
        my $time = shift;
-       $date =~ s/^\s*(\d+)-(\w\w\w)-(19\d\d)$/$1 $2 $3/;
-       $time =~ s/^(\d\d)(\d\d)Z$/$1:$2 +0000/;
+
+       return 0 unless /^\s*(\d+)-(\w\w\w)-([12][90]\d\d)$/;
+       $date = "$1 $2 $3";
+       return 0 unless /^(\d\d)(\d\d)Z$/;
+       $time = "$1:$2 +0000";
        return str2time("$date $time");
 }