[Mailman-Developers] pipermail/hypermail mbox-archive

Thomas Wouters thomas@xs4all.net
Mon, 27 Mar 2000 21:15:02 +0200


--i9LlY+UWpKt15+FH
Content-Type: text/plain; charset=us-ascii


There was a short discussion a month or so ago about the hyperarch 'mbox'
archives having the wrong kind of date in the 'From ' lines... 'unixfrom'
lines should have a very specific dateformat, namely that which 'time.ctime'
returns. The following patch fixes Archiver/HyperArch.py. However, I'm not
entirely sure if it will work correctly in other locales... can anyone test
that, and propose a locale-independant way of producing this format ?

Grtz,
-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

--i9LlY+UWpKt15+FH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="HyperArch.py.diff"

Index: Mailman/Archiver/HyperArch.py
===================================================================
RCS file: /projects/cvsroot/mailman/Mailman/Archiver/HyperArch.py,v
retrieving revision 1.16
diff -u -r1.16 HyperArch.py
--- HyperArch.py	2000/03/21 06:25:10	1.16
+++ HyperArch.py	2000/03/27 19:08:04
@@ -64,7 +64,7 @@
 
 
 article_text_template="""\
-From %(email)s %(datestr)s
+From %(email)s %(fromdate)s
 Date: %(datestr)s
 From: %(author)s %(email)s
 Subject: %(subject)s
@@ -154,6 +154,7 @@
 #  subject  : Subject
 #  datestr  : The posting date, in human-readable format
 #  date     : The posting date, in purely numeric format
+#  fromdate : The posting date, in 'unixfrom' format
 #  headers  : Any other headers of interest
 #  author   : The author's name (and possibly organization)
 #  email    : The author's e-mail address
@@ -242,7 +243,7 @@
 	    date=time.mktime(date)-tzoffset
 	else:
 	    date=self.__last_article_time+1 
-	    
+	self.fromdate = time.ctime(date)
 	self.__last_article_time=date 
 	self.date='%011i' % (date,)
 

--i9LlY+UWpKt15+FH--