projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added more restrictive time parsing
[spider.git]
/
perl
/
DXUtil.pm
diff --git
a/perl/DXUtil.pm
b/perl/DXUtil.pm
index f5263a271f55d20d9fd49b811bf389ff0d03ec3b..6c3ff30af271f7d31a3657c82dd01500c4cf9446 100644
(file)
--- a/
perl/DXUtil.pm
+++ b/
perl/DXUtil.pm
@@
-65,9
+65,9
@@
sub cltounix
my $date = shift;
my $time = shift;
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";
$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");
}
$time = "$1:$2 +0000";
return str2time("$date $time");
}