projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added some more isolation
[spider.git]
/
perl
/
DXUtil.pm
diff --git
a/perl/DXUtil.pm
b/perl/DXUtil.pm
index 994cdd981a735c4753aeedbedac8c46d08b1ea82..6c3ff30af271f7d31a3657c82dd01500c4cf9446 100644
(file)
--- a/
perl/DXUtil.pm
+++ b/
perl/DXUtil.pm
@@
-64,8
+64,11
@@
sub cltounix
{
my $date = shift;
my $time = shift;
{
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 $date =~ /^\s*(\d+)-(\w\w\w)-([12][90]\d\d)$/;
+ $date = "$1 $2 $3";
+ return 0 unless $time =~ /^([012]\d)([012345]\d)Z$/;
+ $time = "$1:$2 +0000";
return str2time("$date $time");
}
return str2time("$date $time");
}