iamkun / iamkun/dayjs

dayjs.utc().isUTC() is always returning true

Open
#1,956 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**

I am using this `dayjs.utc().isUTC()` to make sure that that `date` I am getting is in utc format, though this function is always returning true no matter that the input.


**Expected behavior**
it should return `true` only when input date is in utc

**Information**
- Day.js Version : 1.11.3
- OS: ubuntu
- using in nodejs
- Time zone: GMT+05:30

Contributor guide

Open the contributing guide

Research direction

Start by reproducing dayjs.utc().isUTC() in Node.js with both UTC and non-UTC inputs, using the issue's Day.js version and timezone details. Trace the isUTC() entry point and existing behavior, then verify that the result distinguishes the input cases described in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.