leanprover-community / leanprover-community/queueboard-core
Show "last updated" time in the local timezone
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 9
- Avg merge
- 2h 58m
- Merged PRs (30d)
- 4
Description
As referenced here.
Apparently, this can be done using javascript, using Date.getTimeZoneOffset() to query the user's local timezone: converting the UTC date to the user's timezone should not be hard.
Trying to format the date in the user's locale is very much not recommended: sticking to the strict current formatting seems possible, though, and shouldn't be too hard to implement in javascript. See this for some inspiration; this answer has a quick-and-dirty implementation.
Bonus points for degrading nicely when the user has javascript disabled. :-)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at dashboard.py line 149 and read the linked JavaScript Date documentation and formatting example. Verify how the current UTC timestamp is rendered, then make the displayed “last updated” time use the user's local timezone while preserving the strict current format. Check that the display still degrades acceptably when JavaScript is disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100