Commit fc0705e8 by Torkel Ödegaard

fix(elasticsearch): fix for daily pattern when getting index for today, is now…

fix(elasticsearch): fix for daily pattern when getting index for today, is now using utc, fixes #2913
parent 6fecb4bf
......@@ -20,7 +20,7 @@ function (_, moment) {
IndexPattern.prototype.getIndexForToday = function() {
if (this.interval) {
return moment().format(this.pattern);
return moment.utc().format(this.pattern);
} else {
return this.pattern;
}
......
......@@ -8,7 +8,7 @@ declare var IndexPattern: any;
describe('IndexPattern', function() {
describe('when getting index for today', function() {
describe.only('when getting index for today', function() {
it('should return correct index name', function() {
var pattern = new IndexPattern('[asd-]YYYY.MM.DD', 'Daily');
var expected = 'asd-' + moment().format('YYYY.MM.DD');
......
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