diff --git a/src/test/java/org/elasticsearch/watcher/support/DynamicIndexNameIntegrationTests.java b/src/test/java/org/elasticsearch/watcher/support/DynamicIndexNameIntegrationTests.java index 4fc326b5a19..422e22ce6b5 100644 --- a/src/test/java/org/elasticsearch/watcher/support/DynamicIndexNameIntegrationTests.java +++ b/src/test/java/org/elasticsearch/watcher/support/DynamicIndexNameIntegrationTests.java @@ -62,7 +62,7 @@ public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegration assertWatchWithMinimumPerformedActionsCount("_id", 1, false); - final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().now()); + final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().nowUTC()); logger.info("checking index [{}]", indexName); assertBusy(new Runnable() { @Override @@ -77,7 +77,7 @@ public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegration @Test public void testDynamicIndexSearchInput() throws Exception { - final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().now()); + final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().nowUTC()); createIndex(indexName); index(indexName, "type", "1", "key", "value"); flush(); @@ -102,7 +102,7 @@ public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegration @Test public void testDynamicIndexSearchTransform() throws Exception { - final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().now()); + final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().nowUTC()); createIndex(indexName); index(indexName, "type", "1", "key", "value"); flush();