瀏覽代碼

Fix Elastic datasource tests - use moment.utc() instead moment() to prevent timezone-related issues, fixes #5733. (#5746)

Alexander Zobnin 9 年之前
父節點
當前提交
f8f7543d4a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      public/app/plugins/datasource/elasticsearch/specs/datasource_specs.ts

+ 2 - 2
public/app/plugins/datasource/elasticsearch/specs/datasource_specs.ts

@@ -59,8 +59,8 @@ describe('ElasticDatasource', function() {
 
       ctx.ds.query({
         range: {
-          from: moment([2015, 4, 30, 10]),
-          to: moment([2015, 5, 1, 10])
+          from: moment.utc([2015, 4, 30, 10]),
+          to: moment.utc([2015, 5, 1, 10])
         },
         targets: [{ bucketAggs: [], metrics: [], query: 'escape\\:test' }]
       });