diff options
author | 2020-04-30 15:59:36 -0700 | |
---|---|---|
committer | 2020-04-30 15:59:36 -0700 | |
commit | 0a9a4c6f6942417fe26a8ce2d457ed340b4098dd (patch) | |
tree | 4c2208db2437e96616cc74e3fbd44527fbcbabb2 | |
parent | probe-mirmon: improve capture usage (diff) | |
download | gentoo-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-x | probe-mirmon | 4 |
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; } |