Answer architecture round 1: 1 🔴, 2 🟡 (0 misread); render the stamp through Effects.local_time

This commit is contained in:
2026-10-28 18:33:31 +01:00
parent 43e7e96b41
commit 08855e8055
5 changed files with 21 additions and 19 deletions
+2 -1
View File
@@ -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(),