From: Vinay Sajip <vinay_sajip@yahoo.co.uk> Date: Mon, 16 Jan 2006 09:13:58 +0000 (+0000) Subject: TimedRotatingFileHandler now calculates next rollover from previous rollover rather... X-Git-Tag: v2.5a0~812 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d952041dc7e9c9520302fb1086119e356b46a645;p=python TimedRotatingFileHandler now calculates next rollover from previous rollover rather than current time. --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 6225f17f96..c6b526a9c6 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -282,7 +282,7 @@ class TimedRotatingFileHandler(BaseRotatingHandler): self.stream = codecs.open(self.baseFilename, 'w', self.encoding) else: self.stream = open(self.baseFilename, 'w') - self.rolloverAt = int(time.time()) + self.interval + self.rolloverAt = self.rolloverAt + self.interval class SocketHandler(logging.Handler): """