]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-120683: Fix an error in logging.LogRecord timestamp (GH-120709)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 24 Jun 2024 06:50:39 +0000 (09:50 +0300)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2024 06:50:39 +0000 (09:50 +0300)
commit1500a23f33f5a6d052ff1ef6383d9839928b8ff1
treee5339de97e05b9e425aac47af6c5fd388c9ca2cc
parent02df6795743ee4ee26a07986edbb5e22ae9fec8b
gh-120683: Fix an error in logging.LogRecord timestamp (GH-120709)

The integer part of the timestamp can be rounded up, while the millisecond
calculation truncates, causing the log timestamp to be wrong by up to 999 ms
(affected roughly 1 in 8 million timestamps).
Lib/logging/__init__.py
Lib/test/test_logging.py
Misc/NEWS.d/next/Library/2024-06-18-19-18-10.gh-issue-120683.xmRez7.rst [new file with mode: 0644]