using utcOffset setter with keepLocalTime = true results in inconsistent date
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
if .utcOffset setter is called with the second param (keepLocalTime) set to true weird things start to happen:
- the toString() function will return incorrect results.
- diff() function will work incorrectly
- the format() function however returns the **correct** result
Reproduction on dayjs website in chrome js console:

**Expected behavior**
The format and toString functions should return consistent results, being the same date, diff should return zero.
**Information**
- OS: Windows
- Browser Chrome 88.0.4324.190
- Time zone: CET
Contributor guide
Research direction
Start by reproducing the utcOffset call with keepLocalTime set to true in the Day.js website Chrome console, then compare the outputs of toString(), diff(), and format(). Done means the date representations are consistent and diff() returns zero for the reproduced case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100