a day should never be stored as a timestamp but as a YYYY-MM-DD always, it's pathological to use a timestamp for a day
"invalid states should be made impossible to represent" - storing a date as a timestamp makes it ambiguous what is correct, and you also introduce time zone ambiguity.
also document somewhere that everything always everywhere in this application stores everything and logs everything and handles everything in utc regardless of TZ or the system time.
Days: every day the program stores, logs or compares is a YYYY-MM-DD value, in a type that can hold nothing else, never a time.Time. Known case: AbuseIPDB's daily count stores its day as time.Time in internal/reputation/abuseipdb.go. Find every other case and list them in the PR body.
UTC: every time the program stores, logs, prints or compares is in UTC, whatever TZ or the system clock's zone. A test runs with TZ set to a zone far from UTC and shows a stored state file, a request log line and a process log line all in UTC.
Document it in one place a newcomer reads: SPEC.md, near the start, one short paragraph saying that the whole application stores, logs and handles every time in UTC, and every day as YYYY-MM-DD; AGENTS.md names it as an iron rule.
No other behaviour changes. Before 1.0 there is no installed base, so the state file format changes in place, with no migration.
Follow AGENTS.md: checks only through make targets. make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; a flock timeout also exits 1, so read the output. Push over SSH and post with tea, since GITEA_TOKEN is refused. Label the PR needs-review.
Model: opus-5-5
sneak, on https://git.eeqj.de/sneak/smallwebwaf/issues/217:
> a day should never be stored as a timestamp but as a YYYY-MM-DD always, it's pathological to use a timestamp for a day
> "invalid states should be made impossible to represent" - storing a date as a timestamp makes it ambiguous what is correct, and you also introduce time zone ambiguity.
>
> also document somewhere that everything always everywhere in this application stores everything and logs everything and handles everything in utc regardless of TZ or the system time.
Reading: https://git.eeqj.de/sneak/smallwebwaf/issues/217#issuecomment-176005.
**Definition of done**, one PR into `next`:
- **Days:** every day the program stores, logs or compares is a `YYYY-MM-DD` value, in a type that can hold nothing else, never a `time.Time`. Known case: AbuseIPDB's daily count stores its day as `time.Time` in `internal/reputation/abuseipdb.go`. Find every other case and list them in the PR body.
- **UTC:** every time the program stores, logs, prints or compares is in UTC, whatever `TZ` or the system clock's zone. A test runs with `TZ` set to a zone far from UTC and shows a stored state file, a request log line and a process log line all in UTC.
- **Document it** in one place a newcomer reads: `SPEC.md`, near the start, one short paragraph saying that the whole application stores, logs and handles every time in UTC, and every day as `YYYY-MM-DD`; `AGENTS.md` names it as an iron rule.
- No other behaviour changes. Before 1.0 there is no installed base, so the state file format changes in place, with no migration.
Follow `AGENTS.md`: checks only through `make` targets. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check`; a `flock` timeout also exits 1, so read the output. Push over SSH and post with `tea`, since `GITEA_TOKEN` is refused. Label the PR `needs-review`.
Model: opus-5-5
clawbot
self-assigned this 2026-11-11 00:57:22 +01:00
AbuseIPDB's day in reputation.json is now a date, "day": "2026-10-06", kept as a civil.Date from the UTC clock. It was the only day the program stored or compared.
Times were already UTC. A new test runs sww discriminator 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.
Judgement call, open for the owner: a time an admin writes into a state file with an offset keeps that offset when sww writes the file back. Converting such times on load touches about 25 fields in 8 packages.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/317.
- AbuseIPDB's day in `reputation.json` is now a date, `"day": "2026-10-06"`, kept as a `civil.Date` from the UTC clock. It was the only day the program stored or compared.
- Times were already UTC. A new test runs `sww discriminator` 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.
- Judgement call, open for the owner: a time an admin writes into a state file with an offset keeps that offset when sww writes the file back. Converting such times on load touches about 25 fields in 8 packages.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
sneak, on #217:
Reading: #217 (comment).
Definition of done, one PR into
next:YYYY-MM-DDvalue, in a type that can hold nothing else, never atime.Time. Known case: AbuseIPDB's daily count stores its day astime.Timeininternal/reputation/abuseipdb.go. Find every other case and list them in the PR body.TZor the system clock's zone. A test runs withTZset to a zone far from UTC and shows a stored state file, a request log line and a process log line all in UTC.SPEC.md, near the start, one short paragraph saying that the whole application stores, logs and handles every time in UTC, and every day asYYYY-MM-DD;AGENTS.mdnames it as an iron rule.Follow
AGENTS.md: checks only throughmaketargets.make fmt, thenflock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; aflocktimeout also exits 1, so read the output. Push over SSH and post withtea, sinceGITEA_TOKENis refused. Label the PRneeds-review.Model: opus-5-5
Built in #317.
reputation.jsonis now a date,"day": "2026-10-06", kept as acivil.Datefrom the UTC clock. It was the only day the program stored or compared.sww discriminatorwithTZ14 hours ahead of UTC and checks that the process line, the request line andclients.jsonare in UTC.SPEC.mdstates the rule near its start;AGENTS.mdmakes it an iron rule.Model: opus-5-5