Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2020-11-02.09:19:48.025>labels= ['3.8', 'type-bug', 'library']
title='TimedRotatingFileHandler doesn\xe2\x80\x99t handle the switch to/from DST when using daily/midnight rotation'updated_at=<Date2020-11-02.09:38:58.580>user='https://bugs.python.org/CristianMartinezdeMorentin'
CristianMartinezdeMorentin commented on Nov 2, 2020
CristianMartinezdeMorentinmannequin
MannequinAuthor
More actions
TimedRotatingFileHandler doesn’t handle the switch to/from DST when using daily/midnight rotation. When DST switch occurs, the previous day logging file is overwritten. The issue is present regardless of the value of the UTC flag (True/False).
For instance, we had a DST switch on october 24th in Spain and no logging file was created for that day. Instead, the data was written to october 23rd file.
This was fixed by gh-88352: doRollover() no longer overwrites an already rolled over file, and the computation of the rollover time during the DST change was corrected.
The fix is in 3.11.9, 3.12.3 and 3.13.0, so all currently supported versions have it. Python 3.8, reported here, is EOL.
Closing as a duplicate of gh-88352. If you can still reproduce it on a supported version, please comment and it can be reopened.
Activity
CristianMartinezdeMorentin commented on Nov 2, 2020
TimedRotatingFileHandler doesn’t handle the switch to/from DST when using daily/midnight rotation. When DST switch occurs, the previous day logging file is overwritten. The issue is present regardless of the value of the UTC flag (True/False).
For instance, we had a DST switch on october 24th in Spain and no logging file was created for that day. Instead, the data was written to october 23rd file.
serhiy-storchaka commented on Jul 22, 2026
This was fixed by gh-88352: doRollover() no longer overwrites an already rolled over file, and the computation of the rollover time during the DST change was corrected.
The fix is in 3.11.9, 3.12.3 and 3.13.0, so all currently supported versions have it. Python 3.8, reported here, is EOL.
Closing as a duplicate of gh-88352. If you can still reproduce it on a supported version, please comment and it can be reopened.