Skip to content

Commit e1c3f45

Browse files
author
Richard Jones
committed
fix timezone offsetting in email Date: header
1 parent 0b8dea1 commit e1c3f45

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ are given with the most recent entry first.
55
Fixed:
66
- SQL generation for sort/group by separate Link properties (sf bug
77
1417565)
8+
- fix timezone offsetting in email Date: header
89

910
2006-01-27 1.0
1011
Feature:

roundup/mailer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Sending Roundup-specific mail over SMTP.
22
"""
33
__docformat__ = 'restructuredtext'
4-
# $Id: mailer.py,v 1.13 2006-01-27 02:41:18 richard Exp $
4+
# $Id: mailer.py,v 1.14 2006-02-02 04:14:29 richard Exp $
55

66
import time, quopri, os, socket, smtplib, re
77

@@ -14,8 +14,8 @@
1414
try:
1515
from email.Utils import formatdate
1616
except ImportError:
17-
def formatdate(timeval):
18-
return time.strftime("%a, %d %b %Y %H:%M:%S +0000", timeval)
17+
def formatdate():
18+
return time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
1919

2020
class MessageSendError(RuntimeError):
2121
pass
@@ -60,7 +60,7 @@ def get_standard_message(self, to, subject, author=None):
6060
writer.addheader('Subject', encode_header(subject, charset))
6161
writer.addheader('To', ', '.join(to))
6262
writer.addheader('From', author)
63-
writer.addheader('Date', formatdate(time.mktime(time.gmtime())))
63+
writer.addheader('Date', formatdate())
6464

6565
# Add a unique Roundup header to help filtering
6666
writer.addheader('X-Roundup-Name', encode_header(tracker_name,

0 commit comments

Comments
 (0)