From: djk Date: Sat, 30 Jan 1999 20:33:06 +0000 (+0000) Subject: added more restrictive time parsing X-Git-Tag: R_1_24~23 X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=abab69b2a9860c96d8ef5a958056f239d8a18e98 added more restrictive time parsing --- diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index f5263a27..6c3ff30a 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -65,9 +65,9 @@ sub cltounix my $date = shift; my $time = shift; - return 0 unless /^\s*(\d+)-(\w\w\w)-([12][90]\d\d)$/; + return 0 unless $date =~ /^\s*(\d+)-(\w\w\w)-([12][90]\d\d)$/; $date = "$1 $2 $3"; - return 0 unless /^(\d\d)(\d\d)Z$/; + return 0 unless $time =~ /^([012]\d)([012345]\d)Z$/; $time = "$1:$2 +0000"; return str2time("$date $time"); } diff --git a/perl/cluster.pl b/perl/cluster.pl index 5e4dd4d9..fd781914 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -64,7 +64,7 @@ package main; @inqueue = (); # the main input queue, an array of hashes $systime = 0; # the time now (in seconds) -$version = "1.23"; # the version no of the software +$version = "1.24"; # the version no of the software $starttime = 0; # the starting time of the cluster $lockfn = "cluster.lock"; # lock file name