'do a rollover; in this case, a date/time stamp is appended to the filename
when the rollover happens.  However, you want the file to be named for the
start of the interval, not the current time.  If there is a backup count,
then we have to get a list of matching filenames, sort them and remove
the one with the oldest suffix.'

def doRollover(self):

    if self.stream:
        self.stream.close()
        self.stream = None
    t = (self.rolloverAt - self.interval)
    if self.utc:
        timeTuple = time.gmtime(t)
    else:
        timeTuple = time.localtime(t)
    dfn = ((self.baseFilename + '.') + time.strftime(self.suffix, timeTuple))
    if os.path.exists(dfn):
        os.remove(dfn)
    os.rename(self.baseFilename, dfn)
    if (self.backupCount > 0):
        for s in self.getFilesToDelete():
            os.remove(s)
    self.mode = 'w'
    self.stream = self._open()
    currentTime = int(time.time())
    newRolloverAt = self.computeRollover(currentTime)
    while (newRolloverAt <= currentTime):
        newRolloverAt = (newRolloverAt + self.interval)
    if (((self.when == 'MIDNIGHT') or self.when.startswith('W')) and (not self.utc)):
        dstNow = time.localtime(currentTime)[(-1)]
        dstAtRollover = time.localtime(newRolloverAt)[(-1)]
        if (dstNow != dstAtRollover):
            if (not dstNow):
                newRolloverAt = (newRolloverAt - 3600)
            else:
                newRolloverAt = (newRolloverAt + 3600)
    self.rolloverAt = newRolloverAt
