mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
bug in time format
This commit is contained in:
parent
6b8724a1e1
commit
7b0631bc4b
2 changed files with 6 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "meshcore-cli"
|
||||
version = "1.3.8"
|
||||
version = "1.3.9"
|
||||
authors = [
|
||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import re
|
|||
from meshcore import MeshCore, EventType, logger
|
||||
|
||||
# Version
|
||||
VERSION = "v1.3.8"
|
||||
VERSION = "v1.3.9"
|
||||
|
||||
# default ble address is stored in a config file
|
||||
MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/"
|
||||
|
|
@ -136,9 +136,9 @@ async def process_event_message(mc, ev, json_output, end="\n", above=False):
|
|||
ts = data["sender_timestamp"]
|
||||
if process_event_message.timestamp == "on":
|
||||
if (abs(time.time()-ts) < 86400):
|
||||
fmt = "%H:%S"
|
||||
fmt = "%H:%M"
|
||||
else:
|
||||
fmt = "%y-%m-%d %H:%S"
|
||||
fmt = "%y-%m-%d %H:%M"
|
||||
else:
|
||||
fmt = process_event_message.timestamp
|
||||
path_str += f'{datetime.datetime.fromtimestamp(ts).strftime(fmt)},'
|
||||
|
|
@ -339,9 +339,9 @@ async def handle_log_rx(event):
|
|||
ts = adv_timestamp
|
||||
if process_event_message.timestamp == "on":
|
||||
if (abs(time.time()-ts) < 86400):
|
||||
fmt = "%H:%S"
|
||||
fmt = "%H:%M"
|
||||
else:
|
||||
fmt = "%y-%m-%d %H:%S"
|
||||
fmt = "%y-%m-%d %H:%M"
|
||||
else:
|
||||
fmt = process_event_message.timestamp
|
||||
ts_str = f' at {datetime.datetime.fromtimestamp(ts).strftime(fmt)}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue