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
This commit is contained in:
kay delaney
2024-06-27 16:17:21 +03:00
committed by GitHub
parent 0285278cfc
commit 2e0175c3eb
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 {