summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-04-30 15:59:36 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-04-30 15:59:36 -0700
commit0a9a4c6f6942417fe26a8ce2d457ed340b4098dd (patch)
tree4c2208db2437e96616cc74e3fbd44527fbcbabb2
parentprobe-mirmon: improve capture usage (diff)
downloadgentoo-mirrorstats-0a9a4c6f6942417fe26a8ce2d457ed340b4098dd.tar.gz
gentoo-mirrorstats-0a9a4c6f6942417fe26a8ce2d457ed340b4098dd.tar.bz2
gentoo-mirrorstats-0a9a4c6f6942417fe26a8ce2d457ed340b4098dd.zip
probe-mirmon: ensure valid return from munge
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xprobe-mirmon4
1 files changed, 3 insertions, 1 deletions
diff --git a/probe-mirmon b/probe-mirmon
index b0c3413..ff73776 100755
--- a/probe-mirmon
+++ b/probe-mirmon
@@ -112,6 +112,8 @@ sub munge_date {
if($timestamp >= $year2020 && $timestamp <= $year2038) {
return $timestamp;
} else {
- return Date::Parse::str2time($timestr);
+ my $timestamp = Date::Parse::str2time($timestr);
+ return $timestamp if defined($timestamp);
}
+ return -1;
}