Roundup Tracker - Issues

Issue 1658173

classification
formatdate() in mailer.py doesn't respect main.timezone
Type: Severity: normal
Components: Mail interface Versions:
process
Status: closed fixed
:
: jpend : jpend
Priority: normal :

Created on 2007-02-12 16:24 by anonymous, last changed 2007-09-20 19:49 by jpend.

Messages
msg2402 Author: [hidden] (anonymous) Date: 2007-02-12 16:24
Our tracker has the following in config.ini:

[main]
timezone = -6

This causes most parts of roundup to display local times correctly. The mail interface, however, continues to produce Date: headers like the following:

   Date: Mon, 18 Dec 2006 19:29:06 -0000

AFAICT, this is caused by the following call to formatdate() in mailer.py:

class Mailer:
    def get_standard_message(self, to, subject,author=None)
        [...]
        writer.addheader('Date', formatdate())

At our site, we've simply explicitly added our timezone using the localtime argument to formatdate(). This works because we're using the formatdate() from email.Utils, not the fallback function defined earlier in mailer.py.

I'm not sure how a more complete solution to the problem would look; I do think, though, that mailer.py should respect the timezone setting.

Thanks!

(Apologies if sf.net broke the line wrapping on the snippets above.)

I can be reached at <willmaier@ml1.net>.
msg2403 Author: [hidden] (jpend) Date: 2007-09-20 19:49
mailer.py version 1.20 in CVS now uses the config.TIMEZONE to generate the Date.

Thanks for reporting this, along with the suggested solution.
History
Date User Action Args
2007-02-12 16:24:06anonymouscreate