HSLdevcom / HSLdevcom/digitransit-ui

Wrong timestamps with 12 hour clock

Open
#1,401 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Set start and end to anywhere (e.g. from Kamppi to Rautatieasema)
  2. 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
  3. Notice that it converts 17:00 into 05:00AM instead of 05:00PM

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.