javascript-tutorial / javascript-tutorial/en.javascript.info
Alternative solution to getSecondsToday() task is wrong
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 25.5k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
The two solutions to getSecondsToday() return different results on a day where the time changes due to daylight savings time, such as d = new Date(2022, 2, 13, 4). The first solution correctly takes into account the time adjustment while the second does not.
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
Open the tutorial task containing getSecondsToday() and compare its two solutions. Reproduce the discrepancy with new Date(2022, 2, 13, 4) on a daylight-saving transition day; done means the alternative solution produces the same daylight-saving-aware result as the first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100