Open martonmesz opened 4 weeks ago
Based on info from @hughess on Slack, an upcoming Timezone support should fix this.
The date selector has to have a timestamp behind the scenes, so it uses midnight and assumes your dates are all in UTC timezone. This doesn’t make a difference if you’re in a timezone west of UTC, but causes the date to shift one day back if you are in a timezone east of UTC This should be solved by the timezone support we’re working on
I also checked and the problem is only present in timezones east of UTC.
Describe the bug
When I select the start and end date in the date range selector, the returned values are offset by one day.
Steps to Reproduce
Create a simple date selector as below:
Write a simple query that returns the selected values as strings
Examine the returned values
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information, or Workarounds
I tagged this as serious because users might not even notice if the range selector returns an incorrect range behind the scenes. There was an initial discussion on Slack where people suggested this is a timezone issue. If that's the case and the offset depends on the user's timezone then there is no easy fix like manually countering the offset. Workaround is to not use this feature.