From: djk Date: Sat, 30 Jan 1999 20:01:42 +0000 (+0000) Subject: forgot to write this away X-Git-Tag: R_1_24~24 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=fbf952ad4e29eb8132007d0f1f3dc5eb1f4a0ff4;p=spider.git forgot to write this away --- diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 994cdd98..f5263a27 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -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"); }