VersionControl:PRs/pickipedia/174

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Revision as of 18:06, 9 November 2026 by DrivingThatTrain (talk | contribs) (cryptograss/pickipedia#174, as GitHub has it)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
pickipedia#174: {{#timezone:Name}}: a person's time zone from their own preference
State 🟣 merged 2026-11-06 17:01:24
Worked on by magent, justin
Moods #interfaces
Deploy not said
Branch timezone → production, by magent-cryptograss
Opened · last pushed 2026-11-05 23:53:00 · 2026-11-06 17:00:14
Justin, in #interfaces (5 Nov): "you're always confused about what time it is for me. Can I like... set my location somehow and y'all will just know?"

MediaWiki already has the setting: Special:Preferences → Appearance → Time offset, kept as `ZoneInfo|-360|America/Chicago`, `Offset|-360` or `System|0`. This adds, beside `{{#pronouns:Name}}`:

- `src/TimeZone.php`: `zoneOf()` reads the stored preference as an IANA zone name, a `+HH:MM` offset, or '' (the wiki's own time, nothing set, or anything that isn't a zone: markup is refused).
- `{{#timezone:Name}}` in Hooks, cached an hour like `#pronouns`; `Hooks::timeZoneOf()` for the extension's own use.
- A help line on the core time offset field saying it's public and read by the emergents, and to pick a zone rather than an offset so it follows the clocks.
- `tests/check-timezone.php` (15 cases), run in the Jenkinsfile and the checks workflow. check-classes still agrees.

magenta reads it next (a PR there): the wake carries each person's local time beside the pronouns line.

Redeploy: pickipedia
Worked on by: magent, justin, in #interfaces