Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One hour added to time when selecting date in DST with a fixed timezone. #1059

Open
aostijn opened this issue Dec 18, 2024 · 0 comments
Open
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working

Comments

@aostijn
Copy link

aostijn commented Dec 18, 2024

Hi! First of all, thanks a lot for the work on this tool, it's great! I ran into an issue that somewhat resembles #991 but doesn't seem to be entirely the same (#991 occurred in 9.0.3 and should be fixed with 10.0.0 but for my problem, it's the opposite), so I created this bug report.

Describe the bug
I provide a fixed timezone with the timezone string prop (in my case: 'Europe/Brussels'). At the time of writing (December), we're in winter time, so outside of DST. When I choose a date and time outside of DST (for example in January), everything works as expected. But when I choose a date and time inside of DST (for example in June), when I confirm, one hour is added to the time I chose.

Some notes that might be useful:

  • This problem doesn't happen when I don't provide a timezone and I let the datepicker use the local timezone (which also happens to be Europe/Brussels).
  • The problem occurs the other way around too: when I'm inside DST (for example in June) and I pick a date outside DST (for example in January), one hour is subtracted from the time I chose.
  • This problem only started occurring in version 10.0.0. I didn't have the problem with version 9.0.3.

To Reproduce
Steps to reproduce the behavior:

  1. Go to this example in 10.0.0 with the problem
  2. Click on the datepicker.
  3. Choose a date and time in June if you're currently in winter time (or vice versa: pick a date in January if you're currently in summer time).
  4. Confirm the date and time.
  5. Notice how the resulting time is one hour later than the one chosen (or one hour before if you're currently in summer time).

Expected behavior
The time should be the same as selected.

Screenshots
Arc_8V2vaHYVn2

Desktop & mobile (please complete the following information):

  • Browser: Chrome Version 131.0.6778.140 (Official Build) (64-bit)
  • Library version: 10.0.0
@aostijn aostijn added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant