Issue 2315: TimedRotatingFileHandler does not account for daylight savings time (original) (raw)
If TimedRotatingFileHandler is instructed to roll over the log at midnight or on a certain weekday, it needs to consider when daylight savings time starts and ends. The current code just blindly adds self.interval to self.rolloverAt, totally ignoring that sometimes it should add 23 or 25 hours instead of 24 hours.
(I suspect that the implementation would be simpler if you use the datetime module, rather than attempt to patch the existing code.)