VersionControl:PRs/pickipedia/174: Difference between revisions

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
DrivingThatTrain (talk | contribs)
cryptograss/pickipedia#174, as GitHub has it
 
DrivingThatTrain (talk | contribs)
cryptograss/pickipedia#174, as GitHub has it
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
|url=https://github.com/cryptograss/pickipedia/pull/174
|url=https://github.com/cryptograss/pickipedia/pull/174
|author=magent-cryptograss
|author=magent-cryptograss
|state=open
|state=merged
|base=production
|base=production
|branch=timezone
|branch=timezone
|opened=2026-11-05 23:53:00
|opened=2026-11-05 23:53:00
|pushed=2026-11-05 23:52:55
|pushed=2026-11-06 17:00:14
|merged=
|merged=2026-11-06 17:01:24
|closed=
|closed=
|worked_on_by=magent, justin
|worked_on_by=magent, justin
Line 16: Line 16:
|deploy=
|deploy=
}}
}}
<pre class="pr-body">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&#124;-360&#124;America/Chicago`, `Offset&#124;-360` or `System&#124;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</pre>

Latest revision as of 18:06, 9 November 2026

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