This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: TimedRotatingFileHandler at midnight rolls over at 01:00
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: awaters, vinay.sajip
Priority: normal Keywords:

Created on 2006-01-03 14:26 by awaters, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg27221 - (view) Author: Andrew Waters (awaters) Date: 2006-01-03 14:26
Using TimedRotatingFileHandler with interval set to
midnight rolls the log over at 1:00am rather than
midnight. (LocalTime = GMT).

This is because the calculation of seconds until
midnight is incorrect (it behaves as if there are 24
hours, 59 minutes and 59 seconds in the day).

It also means that should a program stop between
midnight and 1:00am and restart it fails to roll over
the log as the log over time is set to 1:00am the next day.

Occurs on Linux (FC3), Windows XP (SP2).

Bug occurs (2.4.2 and currently exists in most recent
2.5 SVN code).
msg27222 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2006-01-16 09:11
Logged In: YES 

Checked into SVN trunk and release24-maint branch.
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42753
2006-01-03 14:26:58awaterscreate