Shorten time format in ui and log.

This commit is contained in:
tecnovert 2023-12-01 21:30:23 +02:00
parent 0be5a4fca7
commit 9efb244952
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93
3 changed files with 4 additions and 3 deletions

View file

@ -76,10 +76,10 @@ class BaseApp:
# Remove any existing handlers
self.log.handlers = []
formatter = logging.Formatter('%(asctime)s %(levelname)s : %(message)s')
formatter = logging.Formatter('%(asctime)s %(levelname)s : %(message)s', '%Y-%m-%d %H:%M:%S')
stream_stdout = logging.StreamHandler()
if self.log_name != 'BasicSwap':
stream_stdout.setFormatter(logging.Formatter('%(asctime)s %(name)s %(levelname)s : %(message)s'))
stream_stdout.setFormatter(logging.Formatter('%(asctime)s %(name)s %(levelname)s : %(message)s', '%Y-%m-%d %H:%M:%S'))
else:
stream_stdout.setFormatter(formatter)
stream_fp = logging.StreamHandler(self.fp)

View file

@ -366,6 +366,7 @@ class BTCInterface(CoinInterface):
return override_feerate, 'override_feerate'
min_relay_fee = chain_client_settings.get('min_relay_fee', None)
def try_get_fee_rate(self, conf_target):
try:
fee_rate = self.rpc_callback('estimatesmartfee', [conf_target])['feerate']

View file

@ -181,7 +181,7 @@ def format_timestamp(value: int, with_seconds: bool = False) -> str:
str_format = '%Y-%m-%d %H:%M'
if with_seconds:
str_format += ':%S'
str_format += ' %Z'
str_format += ' %z'
return time.strftime(str_format, time.localtime(value))