Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-mirrorstats:master commit in: /
Date: Thu, 30 Apr 2020 22:59:42
Message-Id: 1588287576.0a9a4c6f6942417fe26a8ce2d457ed340b4098dd.robbat2@gentoo
1 commit: 0a9a4c6f6942417fe26a8ce2d457ed340b4098dd
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 30 22:59:36 2020 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 30 22:59:36 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=0a9a4c6f
7
8 probe-mirmon: ensure valid return from munge
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 probe-mirmon | 4 +++-
13 1 file changed, 3 insertions(+), 1 deletion(-)
14
15 diff --git a/probe-mirmon b/probe-mirmon
16 index b0c3413..ff73776 100755
17 --- a/probe-mirmon
18 +++ b/probe-mirmon
19 @@ -112,6 +112,8 @@ sub munge_date {
20 if($timestamp >= $year2020 && $timestamp <= $year2038) {
21 return $timestamp;
22 } else {
23 - return Date::Parse::str2time($timestr);
24 + my $timestamp = Date::Parse::str2time($timestr);
25 + return $timestamp if defined($timestamp);
26 }
27 + return -1;
28 }