Commit 5cf78032 by Marcus Andersson Committed by GitHub

Fix: failing tests when running on none english os. (#22913)

parent 8d5c6053
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import _ from 'lodash'; import _ from 'lodash';
// Services & Utils // Services & Utils
import { DataQuery, ExploreMode } from '@grafana/data'; import { DataQuery, ExploreMode, dateTime } from '@grafana/data';
import { renderUrl } from 'app/core/utils/url'; import { renderUrl } from 'app/core/utils/url';
import store from 'app/core/store'; import store from 'app/core/store';
import { serializeStateToUrlParam, SortOrder } from './explore'; import { serializeStateToUrlParam, SortOrder } from './explore';
...@@ -212,10 +212,7 @@ export const createRetentionPeriodBoundary = (days: number, isLastTs: boolean) = ...@@ -212,10 +212,7 @@ export const createRetentionPeriodBoundary = (days: number, isLastTs: boolean) =
}; };
export function createDateStringFromTs(ts: number) { export function createDateStringFromTs(ts: number) {
const date = new Date(ts); return dateTime(ts).format('MMMM D');
const month = date.toLocaleString('default', { month: 'long' });
const day = date.getDate();
return `${month} ${day}`;
} }
export function getQueryDisplayText(query: DataQuery): string { export function getQueryDisplayText(query: DataQuery): string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment