mirror of
https://github.com/basicswap/basicswap.git
synced 2025-01-18 16:44:34 +00:00
Shorten time format in ui and log.
This commit is contained in:
parent
0be5a4fca7
commit
9efb244952
3 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue