commit b31dc550bec0583c40817321fabd1d8637ffe8fa
parent a54609531617b4b188fd505254858aaaecec2f3a
Author: Paul <paul@claws-mail.org>
Date: Thu, 19 Sep 2019 12:52:18 +0100
add patch RFE 4244, 'Handle additional Date header formats'
patch by Alexander Lyons Harkness <me at bearbin.net>
Diffstat:
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git 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
@@ -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
@@ -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;