1.1 --- a/MoinMessage.py Wed Jan 08 01:07:04 2014 +0100
1.2 +++ b/MoinMessage.py Wed Jan 08 01:07:30 2014 +0100
1.3 @@ -12,10 +12,11 @@
1.4 from email.mime.application import MIMEApplication
1.5 from email.mime.base import MIMEBase
1.6 from email.parser import Parser
1.7 -from email.utils import formatdate, parsedate
1.8 +from email.utils import formatdate
1.9 from subprocess import Popen, PIPE
1.10 from tempfile import mkstemp
1.11 from urlparse import urlsplit
1.12 +from DateSupport import getDateTimeFromRFC2822
1.13 import httplib
1.14 import os
1.15
1.16 @@ -46,7 +47,7 @@
1.17 "Obtain the date of the given 'message'."
1.18
1.19 if message.has_key("Date"):
1.20 - self.date = parsedate(message["Date"])
1.21 + self.date = getDateTimeFromRFC2822(message["Date"])
1.22 else:
1.23 self.date = None
1.24
2.1 --- a/MoinMessageSupport.py Wed Jan 08 01:07:04 2014 +0100
2.2 +++ b/MoinMessageSupport.py Wed Jan 08 01:07:30 2014 +0100
2.3 @@ -196,7 +196,7 @@
2.4
2.5 # Reject messages older than the page date.
2.6
2.7 - if message.date < last_date:
2.8 + if message.date.to_utc().as_tuple() < last_date:
2.9 writeHeaders(request, "text/plain", getMetadata(self.page), "403 Forbidden")
2.10 request.write("The message is too old: %s versus %s." % (message.date, last_date))
2.11 return