From fbf952ad4e29eb8132007d0f1f3dc5eb1f4a0ff4 Mon Sep 17 00:00:00 2001 From: djk Date: Sat, 30 Jan 1999 20:01:42 +0000 Subject: [PATCH] forgot to write this away --- perl/DXUtil.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"); } -- 2.43.0