From 906217311b7c4097520c0f9258733979fd1275b9 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 19 Sep 2019 12:52:18 +0100 Subject: [PATCH] add patch RFE 4244, 'Handle additional Date header formats' patch by Alexander Lyons Harkness --- AUTHORS | 1 + src/gtk/authors.h | 1 + src/procheader.c | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/AUTHORS b/AUTHORS index e31ea46f1..e530d7519 100644 --- a/AUTHORS +++ b/AUTHORS @@ -327,3 +327,4 @@ contributors (in addition to the above; based on Changelog) Avinash Sonawane Alex Smith Florian Weimer + Alexander Lyons Harkness diff --git a/src/gtk/authors.h b/src/gtk/authors.h index 2ad414945..310d9fdf4 100644 --- a/src/gtk/authors.h +++ b/src/gtk/authors.h @@ -160,6 +160,7 @@ static char *CONTRIBS_LIST[] = { "Oliver Haertel", "Anders Hammar", "Mitko Haralanov", +"Alexander Lyons Harkness", "Hashimoto", "Jacob Head", "Federico Heinz", diff --git a/src/procheader.c b/src/procheader.c index d384db00e..f5755b6a3 100644 --- a/src/procheader.c +++ b/src/procheader.c @@ -938,6 +938,10 @@ static gint procheader_scan_date_string(const gchar *str, weekday, day, month, year, hh, mm, ss, zone); if (result == 8) return 0; + result = sscanf(str, "%3s %3s %d %2d:%2d:%2d %d %6s", + weekday, month, day, hh, mm, ss, year, zone); + if (result == 8) return 0; + result = sscanf(str, "%d %9s %d %2d:%2d:%2d %6s", day, month, year, hh, mm, ss, zone); if (result == 7) return 0; @@ -947,6 +951,10 @@ static gint procheader_scan_date_string(const gchar *str, weekday, day, month, year, hh, mm, ss); if (result == 7) return 0; + result = sscanf(str, "%3s %3s %d %2d:%2d:%2d %d", + weekday, month, day, hh, mm, ss, year); + if (result == 7) return 0; + result = sscanf(str, "%d %9s %d %2d:%2d:%2d", day, month, year, hh, mm, ss); if (result == 6) return 0; -- 2.11.4.GIT