From 9947dab38917bde3cceaeceb5f27618ed3740d6f Mon Sep 17 00:00:00 2001 From: Areek Zillur Date: Mon, 27 Oct 2014 23:28:48 -0400 Subject: [PATCH] explicit UTC date parsing Original commit: elastic/x-pack-elasticsearch@80a3f01ab1a80e6d29439629e7411f72f5c619ef --- src/main/java/org/elasticsearch/license/core/DateUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/license/core/DateUtils.java b/src/main/java/org/elasticsearch/license/core/DateUtils.java index 111f8031fd7..0459443082b 100644 --- a/src/main/java/org/elasticsearch/license/core/DateUtils.java +++ b/src/main/java/org/elasticsearch/license/core/DateUtils.java @@ -14,7 +14,7 @@ public class DateUtils { private final static FormatDateTimeFormatter formatDateTimeFormatter = Joda.forPattern("yyyy-MM-dd"); - private final static DateTimeFormatter dateTimeFormatter = formatDateTimeFormatter.parser(); + private final static DateTimeFormatter dateTimeFormatter = formatDateTimeFormatter.parser().withZoneUTC(); public static long endOfTheDay(String date) { MutableDateTime dateTime = dateTimeFormatter.parseMutableDateTime(date);