iamkun / iamkun/dayjs

tz.guess() returns deprecated IANA alias "Asia/Calcutta" instead of canonical "Asia/Kolkata"

Open
#3,194 0 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

This is technically an environment/Intl issue, not strictly a dayjs defect. The plugin source I confirmed is a pure passthrough:

r.tz.guess = function () { return Intl.DateTimeFormat().resolvedOptions().timeZone }
So dayjs can't return anything other than what your OS/browser's Intl reports. It only reproduces where Intl itself returns Asia/Calcutta (older ICU, or a system/TZ set to the legacy alias). Because of this, maintainers may reasonably close it as "use Intl" / out-of-scope, or convert it to an enhancement.

I deliberately wrote it honestly — it reports the observed behavior, includes the passthrough source as evidence, and explicitly asks whether canonicalization is in scope for the plugin or should stay userland. That framing is far less likely to be dismissed than claiming a hard bug.

Contributor guide

Open the contributing guide

Research direction

Start with the timezone plugin entry point where `tz.guess` is defined and confirm its `Intl.DateTimeFormat().resolvedOptions().timeZone` passthrough. Decide whether canonicalizing `Asia/Calcutta` to `Asia/Kolkata` belongs in the plugin or should remain userland; done requires a maintainer-approved scope and corresponding behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.