mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Logs Panel: fix timestamp parsing for string dates without timezone (#44664)
This commit is contained in:
parent
46a34451d5
commit
cff7336510
@ -9,7 +9,6 @@ import {
|
|||||||
DataQueryRequest,
|
DataQueryRequest,
|
||||||
DataQueryResponse,
|
DataQueryResponse,
|
||||||
DataSourceApi,
|
DataSourceApi,
|
||||||
dateTime,
|
|
||||||
dateTimeFormat,
|
dateTimeFormat,
|
||||||
dateTimeFormatTimeAgo,
|
dateTimeFormatTimeAgo,
|
||||||
FieldCache,
|
FieldCache,
|
||||||
@ -36,6 +35,7 @@ import {
|
|||||||
textUtil,
|
textUtil,
|
||||||
TimeRange,
|
TimeRange,
|
||||||
toDataFrame,
|
toDataFrame,
|
||||||
|
toUtc,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
import { getThemeColor } from 'app/core/utils/colors';
|
import { getThemeColor } from 'app/core/utils/colors';
|
||||||
import { SIPrefix } from '@grafana/data/src/valueFormats/symbolFormatters';
|
import { SIPrefix } from '@grafana/data/src/valueFormats/symbolFormatters';
|
||||||
@ -367,7 +367,7 @@ export function logSeriesToLogsModel(logSeries: DataFrame[]): LogsModel | undefi
|
|||||||
|
|
||||||
for (let j = 0; j < series.length; j++) {
|
for (let j = 0; j < series.length; j++) {
|
||||||
const ts = timeField.values.get(j);
|
const ts = timeField.values.get(j);
|
||||||
const time = dateTime(ts);
|
const time = toUtc(ts);
|
||||||
const tsNs = timeNanosecondField ? timeNanosecondField.values.get(j) : undefined;
|
const tsNs = timeNanosecondField ? timeNanosecondField.values.get(j) : undefined;
|
||||||
const timeEpochNs = tsNs ? tsNs : time.valueOf() + '000000';
|
const timeEpochNs = tsNs ? tsNs : time.valueOf() + '000000';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user