X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUtil.pm;h=fe82721e16c04e5bdf0095eb56f347b5a3e6609d;hb=0a27cdf136ea8f062fdb319ee99f9d76986522d5;hp=6c3ff30af271f7d31a3657c82dd01500c4cf9446;hpb=c001af008776b1822d9e99a28bfef500cf2d0844;p=spider.git diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 6c3ff30a..fe82721e 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -64,8 +64,10 @@ sub cltounix { my $date = shift; my $time = shift; + my ($thisyear) = (gmtime)[5] + 1900; return 0 unless $date =~ /^\s*(\d+)-(\w\w\w)-([12][90]\d\d)$/; + return 0 unless abs($thisyear-$3) <= 1; $date = "$1 $2 $3"; return 0 unless $time =~ /^([012]\d)([012345]\d)Z$/; $time = "$1:$2 +0000";