Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RAM] Fix snooze scheduler timezone handling (elastic#157338)
## Summary Closes elastic#156535 The Snooze Scheduler was failing to properly save and load snoozes if the user selected a timezone other than the Kibana default. This is because the datepicker only converts timestamp values between UTC and the default Kibana timezone. This PR fixes the issue by offsetting all dates that come in and out of the scheduler UI relative to local time. To test, create a snooze like this on `main` and make sure you select timezone America/Los_Angeles. (If your local timezone is equivalent to America/Los_Angeles, select a different timezone) <img width="426" alt="Screenshot 2023-05-10 at 3 58 57 PM" src="https://github.com/elastic/kibana/assets/1445834/ab95c47c-30a0-44d5-bd9d-45fdb929193d"> On `main`, editing the snooze will (erroneously) display the wrong times: <img width="423" alt="Screenshot 2023-05-10 at 4 03 24 PM" src="https://github.com/elastic/kibana/assets/1445834/ff28ccdd-f491-43ce-87cd-d606c8d71c64"> Repeating this process on this PR's branch will save a snooze with the correct `dtstart` and consequently load the correct snooze time.
- Loading branch information