changeset 3532:f43424d545a6

fix timezone offsetting in email Date: header
author Richard Jones <richard@users.sourceforge.net>
date Thu, 02 Feb 2006 04:14:29 +0000
parents 616244e247f4
children f0432dc11c2d
files CHANGES.txt roundup/mailer.py
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Tue Jan 31 05:08:50 2006 +0000
+++ b/CHANGES.txt	Thu Feb 02 04:14:29 2006 +0000
@@ -5,6 +5,7 @@
 Fixed:
 - SQL generation for sort/group by separate Link properties (sf bug
   1417565)
+- fix timezone offsetting in email Date: header
 
 2006-01-27 1.0
 Feature:
--- a/roundup/mailer.py	Tue Jan 31 05:08:50 2006 +0000
+++ b/roundup/mailer.py	Thu Feb 02 04:14:29 2006 +0000
@@ -1,7 +1,7 @@
 """Sending Roundup-specific mail over SMTP.
 """
 __docformat__ = 'restructuredtext'
-# $Id: mailer.py,v 1.13 2006-01-27 02:41:18 richard Exp $
+# $Id: mailer.py,v 1.14 2006-02-02 04:14:29 richard Exp $
 
 import time, quopri, os, socket, smtplib, re
 
@@ -14,8 +14,8 @@
 try:
     from email.Utils import formatdate
 except ImportError:
-    def formatdate(timeval):
-        return time.strftime("%a, %d %b %Y %H:%M:%S +0000", timeval)
+    def formatdate():
+        return time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
 
 class MessageSendError(RuntimeError):
     pass
@@ -60,7 +60,7 @@
         writer.addheader('Subject', encode_header(subject, charset))
         writer.addheader('To', ', '.join(to))
         writer.addheader('From', author)
-        writer.addheader('Date', formatdate(time.mktime(time.gmtime())))
+        writer.addheader('Date', formatdate())
 
         # Add a unique Roundup header to help filtering
         writer.addheader('X-Roundup-Name', encode_header(tracker_name,

Roundup Issue Tracker: http://roundup-tracker.org/