iamkun / iamkun/dayjs

时间获取错误

Open
#2,586 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
dayjs(621993600000).startOf('day').add('15', 'hours')得到是14点,这个时间使用.add('15', 'hours')得到的各个时间点都不对

**Expected behavior**
dayjs(621993600000).startOf('day').add('15', 'hours')应该得到是15点的时刻

**Information**
- v 1.11.10
- pc端
- chrome 62

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported expression with Day.js v1.11.10 in the stated Chrome environment, then trace the startOf('day') and add('15', 'hours') entry points. Compare the resulting hour with the expected 15:00 and verify that the other reported time points behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.