summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_curl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 796c55fc..5b6564c0 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -2181,10 +2181,14 @@ parse_cert_date (const char *s)
2181{ 2181{
2182 struct tm tm; 2182 struct tm tm;
2183 time_t date; 2183 time_t date;
2184 char *res;
2184 2185
2185 if (!s) return -1; 2186 if (!s) return -1;
2186 2187
2187 strptime (s, "%Y-%m-%d %H:%M:%S GMT", &tm); 2188 /* Jan 17 14:25:12 2020 GMT */
2189 res = strptime (s, "%Y-%m-%d %H:%M:%S GMT", &tm);
2190 /* Sep 11 12:00:00 2020 GMT */
2191 if (res == NULL) strptime (s, "%Y %m %d %H:%M:%S GMT", &tm);
2188 date = mktime (&tm); 2192 date = mktime (&tm);
2189 2193
2190 return date; 2194 return date;