Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions meshtastic/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1972,17 +1972,20 @@ def addRemoteAdminArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentPars
action="store_true",
)

group.add_argument(
"--set-time",
help="Set the time to the provided unix epoch timestamp, or the system's current time if omitted or 0.",
action="store",
type=int,
nargs="?",
default=None,
const=0,
metavar="TIMESTAMP",
)

group.add_argument(
"--set-time",
metavar="TIMESTAMP",
nargs="?",
type=int,
default=None,
const=0,
action="store",
help=(
"Set the device clock using a POSIX timestamp "
"(seconds since 1970-01-01 00:00:00 UTC). "
"If no TIMESTAMP is provided, the current system time is used."
),
)
return parser

def initParser():
Expand Down