From abab69b2a9860c96d8ef5a958056f239d8a18e98 Mon Sep 17 00:00:00 2001 From: djk Date: Sat, 30 Jan 1999 20:33:06 +0000 Subject: [PATCH] added more restrictive time parsing --- perl/DXUtil.pm | 4 ++-- perl/cluster.pl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.34.1