]> git.droids-corp.org - imapami.git/commitdiff
sq
authorOlivier Matz <olivier.matz@6wind.com>
Wed, 30 Nov 2016 10:54:21 +0000 (11:54 +0100)
committerOlivier Matz <olivier.matz@6wind.com>
Wed, 30 Nov 2016 10:54:21 +0000 (11:54 +0100)
imapami/conditions.py

index f674bd5787da240315a047c26d7de764a48d320e..3836b75ae56b13290082da73d9813db16cee0009 100644 (file)
@@ -338,7 +338,7 @@ class ImapamiCondSentBefore(ImapamiCond):
             t -= int(reldate) * 3600 * 24 # XXX
             t = time.gmtime(t)
             month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
-                     "Sep", "Oct", "Nov", "Dec"][t.tm_mon]
+                     "Sep", "Oct", "Nov", "Dec"][t.tm_mon - 1]
             date = "%d-%s-%d" %(t.tm_mday, month, t.tm_year)
         ImapamiCond.__init__(self, criteria=set(['SENTBEFORE "%s"' % date]))
 register(ImapamiCondSentBefore)