Skip to content

Commit

Permalink
Fix: add support for timestamp format generated by timerange copy
Browse files Browse the repository at this point in the history
Timerange copy generates `from` and `to` properties that look like `2001-04-03T03:02:09.010Z`, which was previously not supported.

fix grafana#86969
  • Loading branch information
jan2893 authored May 6, 2024
1 parent 526be4f commit 806b39a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/app/features/dashboard/services/TimeSrv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ export class TimeSrv {
if (utcValue.isValid()) {
return utcValue;
}
} else if (value.length === 24) {
const utcValue = toUtc(value, 'YYYY-MM-DDTHH:mm:ss.SSSZ');
if (utcValue.isValid()) {
return utcValue;
}
}

if (!isNaN(Number(value))) {
Expand Down

0 comments on commit 806b39a

Please sign in to comment.