[v11.0.x] Dashboards: Change parseUrlParam to take timezone into account (#89837)

Dashboards: Change datemath parse logic so parsed dates always take timezone into account (#88182)

* Dashboards: Change datemath parse logic so parsed dates always take timezone into account

(cherry picked from commit 2e0175c3eb)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-07-23 14:16:34 +02:00
committed by GitHub
co-authored by kay delaney
parent ee76613eae
commit 8266543f94
3 changed files with 26 additions and 4 deletions
@@ -43,9 +43,11 @@ export function parse(
if (isDateTime(text)) {
return text;
}
if (isDate(text)) {
return dateTime(text);
}
// We got some non string which is not a moment nor Date. TS should be able to check for that but not always.
return undefined;
} else {