TestMemorySearchDatesInLocalTime (4028687b8) set time.Local to +08:00.
time.Local is read by every time.Now, so the swap raced an http conn
goroutine an earlier test (serveMTLSGateway) left finishing: main's Test
run 43194740198 at 727e23637 went red on macOS -race with a DATA RACE
on time.Local, memory_mcp_test.go:262 against net/http setState.
Now no test touches time.Local here:
- memoryStamp writes in memoryZone(), time.Local by default, a variable
the gateway test sets.
- The half that checked a new save keeps its zone moved to memory's own
TestSaveKeepsTheLocalZone, which holds memory's clock (now) at 04:30
+08:00 and reads "+08:00" back from memory.json.
Run on mote: go vet ./internal/memory ./internal/gateway, linux nogui
and windows vet of both; go test ./internal/memory ok;
go test -race -count=3 -run ^TestMemory ./internal/gateway ok; gofmt -l
empty. Broken by hand, each red: Save's now() as now().UTC() fails
TestSaveKeepsTheLocalZone; memoryStamp in time.UTC fails
TestMemorySearchDatesInLocalTime ("2026-11-10T20:30Z").
Not run: the full gateway package (the race needs a leftover goroutine
from another test, so it isn't reproduced on demand; the swap that it
raced on is gone). Same class still open: #2949 (TestHeldClock) and
#4360 (testenv.Zone's cleanup), which swap time.Local too.