Skip to content

Commit 8317a45

Browse files
committed
Python functional tests should log in UTC
bitcoind logs use UTC. Python functional tests should also log in UTC.
1 parent 61d75f5 commit 8317a45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import sys
1111
import shutil
1212
import tempfile
13+
import time
1314
import traceback
1415

1516
from .util import (
@@ -202,6 +203,7 @@ def _start_logging(self):
202203
ch.setLevel(ll)
203204
# Format logs the same as bitcoind's debug.log with microprecision (so log files can be concatenated and sorted)
204205
formatter = logging.Formatter(fmt = '%(asctime)s.%(msecs)03d000 %(name)s (%(levelname)s): %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
206+
formatter.converter = time.gmtime
205207
fh.setFormatter(formatter)
206208
ch.setFormatter(formatter)
207209
# add the handlers to the logger

0 commit comments

Comments
 (0)