dayjs().format() returning future dates
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When calling dayjs().format(), the function occasionally returns a date that is a few days ahead of the current date. While the hours, minutes, and seconds remain consistent, the date itself is unstable. For example, on 2024-04-12T14:09:58Z, a client request was made to the API with a request body of 2024-04-15T16:09:58+02:00, showing the date as three days in the future.
Expected behavior
The dayjs().format() function should return the client's current date and time accurately, without any discrepancies.
Information
- Day.js Version: ^1.11.9
- OS: Android K
- Browser: Chrome
- Time zone: central european summer time UTC +2
Contributor guide
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
No source file or test is identified. Start by reproducing dayjs().format() with the reported Android, Chrome, and UTC+2 environment and compare the client date with the formatted result; done means the reported future-date discrepancy is explained and corrected, with coverage for the failing case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100