Skip to content

+00:00 timezone bug #3068

@rahulpratik

Description

@rahulpratik

Describe the bug

When we have +00:00 timezone offset like 'Europe/London" dayjs gets users timezone offset, which causes incorrect time showing in different cases.

Example

Current behavior:
dayjs('2021-10-31T15:00:00+00:00').tz('Europe/London').format() // 2021-10-31T15:00:00Z

Expected behavior
Behavior after fix:
dayjs('2021-10-31T15:00:00+00:00').tz('Europe/London').format() // 2021-10-31T15:00:00+00:00

Information

  • Day.js Version [v1.11.20]
  • OS: [iOS]
  • Browser [Chrome 147]
  • Time zone: [BST]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions