iamkun / iamkun/dayjs

dayjs.tz instances produce inconsistent results with repeated calls

Open
#2,992 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

When calling dayjs.tz(...) multiple times on the same date, the timezone may shift unexpectedly.

const dt = dayjs('2020-08-08T00:00:00.000Z');
console.log(dt.tz('America/Chicago').tz('America/Chicago').format());

Expected:
Same date/time

Actual:
Date shifts back repeatedly

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.