Answer architecture round 1: 1 🔴, 2 🟡 (0 misread); render the stamp through Effects.local_time
This commit is contained in:
@@ -37,6 +37,7 @@ class Effects:
|
||||
execv: typing.Callable[[str, list[str]], None]
|
||||
git: Git
|
||||
input: typing.Callable[[str], str]
|
||||
# A time of day in the machine's zone, as `2026-10-28 11:46:01`.
|
||||
local_time: typing.Callable[[float], str]
|
||||
# The machine's memory; None where it cannot be read.
|
||||
memory: typing.Callable[[], Memory | None]
|
||||
@@ -68,7 +69,7 @@ def system_effects() -> Effects:
|
||||
execv=os.execv,
|
||||
git=git_repo.git,
|
||||
input=input,
|
||||
local_time=lambda seconds: time.strftime("%Y-%m-%d %H:%M %Z", time.localtime(seconds)),
|
||||
local_time=lambda seconds: time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(seconds)),
|
||||
memory=read_memory,
|
||||
now=time.time,
|
||||
on_terminal=lambda: sys.stdin.isatty() and sys.stdout.isatty(),
|
||||
|
||||
Reference in New Issue
Block a user