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

Mark Sapiro mark at msapiro.net
Fri Oct 21 16:49:42 CEST 2011

On 10/20/2011 7:09 AM, Ivan Kuznetsov wrote:
> After the local timezone rules change the mailman sends messages with
> incorrect timezone in Date: header.
> Date: Thu, 20 Oct 2011 15:54:40 +0300
> We are using mailman for years without such a problem before. All other
> software run at this host now have the correct understanding the local
> time as MSK standard time = GMT+4
> [root at gate2 mailman]# date '+%Z %::z'
> MSK +04:00:00

This is the part that I find strange. Mailman uses Python's
email.Utils.formatdate(localtime=1) function to get the date/time string
for the Date header. This in turn uses Python's time module to get the
actual time and timezone values and that in turn uses C library
functions to get them from the underlying OS. See

Try seeing in an interactive Python session what things like
email.Utils.formatdate(localtime=1), time.localtime(), time.daylight and
time.altzone return. If they are not returning what you expect, this is
a Python issue.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list