iamkun / iamkun/dayjs

utcOffset returns different values for f=format() and toISOString()

Open
#2,299 1 comment 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**
Am I missing something here?
When creating an object with utfOffset(), I set the second argument to true or false, which should create objects with differing point in time.

When using format() to show the show the whole string the hour is as expected (different) at the same timezone.
But when using toISOString() or valueOf() it shows that both objects are at the same moment (`1682759400000`)

![image](https://user-images.githubusercontent.com/6390605/235302832-b5e13533-ba44-4215-aa0c-70676068a6ae.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.