HSLdevcom / HSLdevcom/digitransit-ui
Wrong timestamps with 12 hour clock
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 267
- Forks
- 145
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 75
Description
With locales that use 12 hour clocks, the website gives wrong timestamps when trying to convert 24 hour clock timestamps to 12 hour ones.
Steps:
- Set start and end to anywhere (e.g. from Kamppi to Rautatieasema)
- If the current time is in AM range, set arrival by to anything in PM range (or vice versa). E.g. It's 11:30AM, set arrival by to 17:00
- Notice that it converts 17:00 into 05:00AM instead of 05:00PM
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
Reproduce the issue using the route-search time controls with a 12-hour locale, following the listed Kamppi-to-Rautatieasema steps. Trace the conversion from the 24-hour arrival time to its displayed 12-hour value; it is done when PM values remain PM and the reported example no longer becomes 05:00AM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100