-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
Fluent UI react (v8)Issues about @fluentui/react (v8)Issues about @fluentui/react (v8)Resolution: Soft CloseSoft closing inactive issues over a certain periodSoft closing inactive issues over a certain period
Description
Library
React / v8 (@fluentui/react)
System Info
System:
OS: Windows 10 10.0.22621
CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
Memory: 12.78 GB / 31.71 GB
Browsers:
Edge: Chromium (118.0.2088.76)
Internet Explorer: 11.0.22621.1Are you reporting Accessibility issue?
None
Reproduction
https://codepen.io/rocketbang/pen/qBgrEZW
Bug Description
Actual Behavior
When selecting a date anchor on a day when a daylight saving change happens, the TimePicker displays duplicate times
example November 5, 2023 00:00:00 in PST timezone

The bigger issue is even using the timezone offset value of these given dates and trying to format (using onFormatDate) that shows that the duplicated 1:00 and 1:30 dates have the timezone value set incorrectly
https://codepen.io/rocketbang/pen/NWopPRX
There's also the issue of duplicated keys showing up regardless of how onFormatDate is used due to the TimePicker generating keys without the timezone

Expected Behavior
- I would expect that the dates received in
onFormatDatehave their timezone set correctly
e.g. in the above timezone screenshot it should be 00:30 TZ 420, 1:00 TZ 420, 1:30 TZ 420, 1:00 TZ 480, 1:30 TZ 480, 2:00 TZ 480
This allows users of this component to display the timezone correctly to the user when needed - With that fixed some default behaviour to handle the daylight saving change when generating unique keys so the warning does not show up
Logs
No response
Requested priority
Blocking
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
Fluent UI react (v8)Issues about @fluentui/react (v8)Issues about @fluentui/react (v8)Resolution: Soft CloseSoft closing inactive issues over a certain periodSoft closing inactive issues over a certain period
