projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c001af0
)
added extra validation to the year. need my own routine.
author
djk
<djk>
Sun, 21 Mar 1999 21:37:34 +0000
(21:37 +0000)
committer
djk
<djk>
Sun, 21 Mar 1999 21:37:34 +0000
(21:37 +0000)
perl/DXUtil.pm
patch
|
blob
|
history
diff --git
a/perl/DXUtil.pm
b/perl/DXUtil.pm
index 6c3ff30af271f7d31a3657c82dd01500c4cf9446..fe82721e16c04e5bdf0095eb56f347b5a3e6609d 100644
(file)
--- 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";