aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-01 05:06:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-01 05:06:44 +0800
commit65839ea1ee663580ccea1116b13e176b72cf632b (patch)
tree5eb5366f793ce3cbdb329c9f531005d568b7f790 /camel/camel-mime-utils.c
parent25152d9caa8edfcd4c8a9de0eda999cc81f7b89e (diff)
downloadgsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.gz
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.bz2
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.lz
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.xz
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.zst
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.zip
A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01
2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_date): A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01 04:59:41"). Fixes bug #1633. * camel-filter-driver.c (camel_filter_driver_filter_folder): Check to make sure message isn't NULL. svn path=/trunk/; revision=8431
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 49dce438e1..18bf4cb8d3 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -2655,10 +2655,10 @@ header_decode_date(const char *in, int *saveoffset)
char *newdate;
w(g_warning("day not followed by ',' it's probably a broken mail client, so we'll ignore its date entirely"));
- printf ("Giving it one last chance...\n");
+ w(printf ("Giving it one last chance...\n"));
newdate = parse_broken_date (in);
if (newdate) {
- printf ("Got: %s\n", newdate);
+ w(printf ("Got: %s\n", newdate));
t = header_decode_date (newdate, saveoffset);
g_free (newdate);
return t;
@@ -2682,10 +2682,12 @@ header_decode_date(const char *in, int *saveoffset)
g_free(monthname);
}
year = header_decode_int(&inptr);
- if (year<100) {
+ if (year < 69) {
+ tm.tm_year = 100 + year;
+ } else if (year < 100) {
tm.tm_year = year;
} else {
- tm.tm_year = year-1900;
+ tm.tm_year = year - 1900;
}
/* get the time ... yurck */
tm.tm_hour = header_decode_int(&inptr);