[Mailman-Developers] Further on jitterbug open/75 - timezone handling in archiver

Nigel Metheringham Nigel.Metheringham@vdata.co.uk
Tue, 13 Jul 1999 18:05:12 +0100


[Note: there is no way for me as a bug reporter to make a follow up 
note into the bug report - ie I have fixed/worked round this for myself 
but am having to put it to the list since I can't add a comment to the 
bug report...]

The problem was that I was seeing a wierd time skew on my archives 
dating back to the point where DST kicked in (suspicious eh).  
Basically I had 2 archives for each week - one with the correct date on 
- ie
	Monday 12 July
and the other with just one or two messages with a duff date on - 
specifically in this example it would be
	Monday 13 July

The code in HyperArch.py has:-

    def dateToVolName(self,date):
        datetuple=time.gmtime(date)

It appears the later call to strftime is applying its own localtime 
rules.  This may be a libc oddity - I am not good enough on POSIX to 
know that.  If you change the gmtime call to a localtime then it all 
works correctly.

For the record this is on a Red Hat 6.0 system - so Python 1.5.1, glibc 
2.1.

This fix will have side effects that your archive roll over changes 
with the server localtime rather than GMT - I don't know if this is a 
problem for people.

	Nigel.
-- 
[ Nigel Metheringham                  Nigel.Metheringham@VData.co.uk ]
[ Phone: +44 1423 850000                         Fax +44 1423 858866 ]