]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-120683: Fix an error in logging.LogRecord timestamp (GH-120709) (GH-120933)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 24 Jun 2024 07:14:26 +0000 (09:14 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2024 07:14:26 +0000 (07:14 +0000)
commit544a47212b92f52ceffbd50275c6b0c57a446a98
tree7ad39158391255a0639226e83790b8877fd018b4
parentb7240ed3f09ffb4bb8bffac3a1ff88b1e99afa26
[3.13] gh-120683: Fix an error in logging.LogRecord timestamp (GH-120709) (GH-120933)

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).
(cherry picked from commit 1500a23f33f5a6d052ff1ef6383d9839928b8ff1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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]