[Mailman-Users] Incorrect timezone in mailman-generated messages

Ivan Kuznetsov kia at solvo.ru
Mon Oct 24 10:32:46 CEST 2011


Hello!

The Date: header is definitly put by Mailman process (Python library) 
not by MTA. The MTA (postfix 2.7.1) uses system tzdata and works correctly.

The Mailman was restarted just after the system tzdata update. And more, 
we have a power blackout last week so all the company servers were 
rebooted. The problem still exists

Setting the TZ enviroment variable as 'TZ=MSK-4' in Mailman startup 
script solves the problem. So we have a workaround now and have a time 
for more deep investigations :)

Python interactive tests:

Python 2.4.3 (#1, Jul  2 2009, 15:50:05)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time;
>>> import email.Utils;
>>> print (time.localtime());
(2011, 10, 24, 12, 8, 2, 0, 297, 0)
>>> print (time.altzone);
-14400
>>> print (time.daylight);
1
>>> print (email.Utils.formatdate(localtime=1));
Mon, 24 Oct 2011 12:08:33 +0300

As I can understand (I'm not a Python guru) the time.localtime() returns 
correct data and shows that DST is not active (tm_isdst=0). time.altzone 
is correct too (UTC-4). But time.daylight is incorrectly shows that DST 
is active. So the problem is a Python issue, you are right.

I will try to update the Python package and see the result

--
Regards, Ivan Kuznetsov
SOLVO ltd
St.Petersburg, Russia


More information about the Mailman-Users mailing list