Skip to content

dayjs.utc() dropped timezone offset support #1239

Closed
@jeiea

Description

Describe the bug
dayjs.utc('2020-12-01T09:00:00+0900').toDate().getTime() === new Date('2020-12-01T09:00:00+0900').getTime()

Expected behavior
The above evaluates to true. It's the behaviour of dayjs 1.8.33.

Actual behaviour

> dayjs.utc('2020-12-01T09:00:00+0900').toDate()
2020-12-01T09:00:00.090Z
> new Date('2020-12-01T00:00:00+0900')
2020-11-30T15:00:00.000Z

Information

  • Day.js Version: 1.9.6
  • OS: macOS
  • Browser:
  • Time zone: GMT+0900 (Korean Standard Time)

Metadata

Assignees

No one assigned

    Labels

    ☢️BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions