[Mailman-Developers] pipermail -- time zone in date info

Tokio Kikuchi tkikuchi@is.kochi-u.ac.jp
Tue, 12 Sep 2000 10:37:10 +0900


Hi, again.

Well, I think I learned a little bit more from python 
library documentation.

Following patch makes the dates in archive index pages
in Local Time, instead of mix of GMT/Local.

(in Mailman/Archive directory)
mailman@ice% diff -u HyperDatabase.py.old HyperDatabase.py
--- HyperDatabase.py.old        Fri Jun 23 13:30:10 2000
+++ HyperDatabase.py    Tue Sep 12 10:28:11 2000
@@ -199,7 +199,7 @@
        date='None'
        try:
            date, msgid = self.dateIndex.first()
-           date=time.asctime(time.localtime(string.atof(date)))
+           date=time.asctime(time.localtime(string.atof(date)-time.timezone))
        except KeyError: pass
        return date

@@ -209,7 +209,7 @@
        date='None'
        try:
            date, msgid = self.dateIndex.last()
-           date=time.asctime(time.localtime(string.atof(date)))
+           date=time.asctime(time.localtime(string.atof(date)-time.timezone))
        except KeyError: pass
        return date
 

Tokio Kikuchi wrote:
> 
> Hi,
> 
> I was a little bit uneasy on that pipermail's index pages
> show `Starting:', `Ending:', and `Last message date:'
> information in GMT time zone, while `Archived on:' in
> the Local Time. I was able to make a dirty hack to set
> the time zone value in mm_cfg.py but feel like not to
> publish it because the server (platform/OS) should have
> the time zone info in itself. Can someone make a better
> patch for it and upload ?
>