Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimedRotatingFileHandler does not account for daylight savings time #46568

Closed
ceder mannequin opened this issue Mar 17, 2008 · 2 comments
Closed

TimedRotatingFileHandler does not account for daylight savings time #46568

ceder mannequin opened this issue Mar 17, 2008 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@ceder
Copy link
Mannequin

ceder mannequin commented Mar 17, 2008

BPO 2315
Nosy @vsajip

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 = 'https://github.com/vsajip'
closed_at = <Date 2008-04-02.21:13:27.249>
created_at = <Date 2008-03-17.08:00:05.742>
labels = ['type-bug', 'library']
title = 'TimedRotatingFileHandler does not account for daylight savings time'
updated_at = <Date 2008-04-02.21:13:27.247>
user = 'https://bugs.python.org/ceder'

bugs.python.org fields:

activity = <Date 2008-04-02.21:13:27.247>
actor = 'vinay.sajip'
assignee = 'vinay.sajip'
closed = True
closed_date = <Date 2008-04-02.21:13:27.249>
closer = 'vinay.sajip'
components = ['Library (Lib)']
creation = <Date 2008-03-17.08:00:05.742>
creator = 'ceder'
dependencies = []
files = []
hgrepos = []
issue_num = 2315
keywords = []
message_count = 2.0
messages = ['63622', '64881']
nosy_count = 2.0
nosy_names = ['vinay.sajip', 'ceder']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue2315'
versions = ['Python 2.5']

@ceder
Copy link
Mannequin Author

ceder mannequin commented Mar 17, 2008

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.)

@ceder ceder mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Mar 17, 2008
@vsajip
Copy link
Member

vsajip commented Apr 2, 2008

Updated SVN, but not backported to 2.5 or earlier maintenance branches.

@vsajip vsajip closed this as completed Apr 2, 2008
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant