Every time in UTC, and every day as YYYY-MM-DD (closes #313)
check / check (push) Failing after 1m25s

AbuseIPDB's daily count keeps its day as a civil.Date, taken from the UTC
clock and written to reputation.json as "YYYY-MM-DD"; it was a time.Time
at midnight. Every time read from a state file is converted to UTC, so a
time an admin writes with an offset is written back in UTC.
TestMainRunsWAF runs sww waf with TZ 14 hours ahead of UTC and checks
that the process line, the request line and clients.json are in UTC.
SPEC.md states the rule near its start; AGENTS.md makes it an iron rule.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-11 01:46:04 +00:00
1 parent f7e3190654
commit 42b99007c8
11 files changed
+256 -22

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ type FileParams struct {
// Path is the lookup database, the IPinfo Lite file in its .mmdb form
// (SWW_LOOKUP_DB_PATH).
Path string
// Now tells the time, normally time.Now.
// Now tells the time, normally time.Now in UTC.
Now func() time.Time
// ProcessLog receives each reading of the file, and why a replacement
// of it cannot be read.
+1 -1
View File
@@ -74,7 +74,7 @@ type Params struct {
// Answered, unless nil, is given each answer GeoJS gives, once it is
// kept.
Answered func(Answer)
// Now tells the time, normally time.Now.
// Now tells the time, normally time.Now in UTC.
Now func() time.Time
// ProcessLog receives GeoJS's failures.
ProcessLog *slog.Logger