Commit b6ac8be
docs(SR-187): AGENTS.md datetime hygiene section
Closes the last open acceptance item from #186:
- [ ] Docs: AGENTS.md 'datetime hygiene' section
What was added
--------------
1. Step 3 of ARCHÄOLOGIE-TSUNAMI's BANNED-Patterns list now mentions
datetime.utcnow() with a forward-ref to the new Python section.
2. New 'Python / Datetime Hygiene' subsection under EXPLICITE VERBOTE.
Documents:
- Why utcnow() is banned (naive dt + Py 3.12 deprecation + 3.14 removal)
- Why bare datetime.now() is also banned (local-tz leak)
- The required pattern: datetime.now(timezone.utc)
- When to keep the legacy 'Z' suffix (external wire-format / log
consumers) vs when '+00:00' is fine (internal sqlite/state JSON)
- Where the rule is enforced: scripts/check_banned_patterns.py
- Where the tests live: UtcnowBanTests
YAML-frontmatter format preserved (content: | scalar, 2-space indent,
manually verified via python3 indentation-scan).
No code changes. CI's check_banned_patterns.py will pass unchanged
because banned tokens inside markdown frontmatter aren't scanned.
Co-authored-by: v0 agent (Delqhi) <agent@v0.app>1 parent fca332b commit b6ac8be
1 file changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
80 | 108 | | |
81 | 109 | | |
82 | 110 | | |
| |||
0 commit comments