Skip to content

1 hour offset when using UTC timezones that have Daylight Saving Time in DateTimePicker #2967

@victordomingospinto

Description

@victordomingospinto

Describe the bug
If I am using the Material UI DateTimePicker https://mui.com/x/react-date-pickers/ and have my timezone as Europe/London or Europe/Lisbon, the moment I click on the calendar date I get an offset of 1h on my timestamp https://codesandbox.io/p/sandbox/3w6yfw but no offset at all if I only click directly on hour or minute. Also, the bug doesn't occur on UTC timezones that do not use Daylight Saving Time such as Africa/Lome or any other timezones.

I have also created this https://codesandbox.io/p/sandbox/datepicker-forked-jygfn7 with Luxon to find out where the bug is coming from and had no offset issues.

Expected behavior
No offset when I click on the DateTimePicker calendar day while using DayJs.

Information

  • Day.js Version v.11.19
  • OS: iOS and Windows
  • Browser: Chrome, Firefox
  • Time zone: GMT 00:00

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