explicit UTC date parsing

Original commit: elastic/x-pack-elasticsearch@80a3f01ab1
This commit is contained in:
Areek Zillur 2014-10-27 23:28:48 -04:00
parent 351288b3dc
commit 9947dab389
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ public class DateUtils {
private final static FormatDateTimeFormatter formatDateTimeFormatter = Joda.forPattern("yyyy-MM-dd"); 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) { public static long endOfTheDay(String date) {
MutableDateTime dateTime = dateTimeFormatter.parseMutableDateTime(date); MutableDateTime dateTime = dateTimeFormatter.parseMutableDateTime(date);