From e9c8eb6121c32da88e52d5b8f30f7a418f613888 Mon Sep 17 00:00:00 2001 From: Cyrus Venn Casada Date: Thu, 3 Dec 2015 15:59:37 +0800 Subject: [PATCH] Use Locale.getDefault() instead of with parameter to work on java 1.6 api BMS-2015 Reviewer: Aldrin Batac --- src/main/java/org/generationcp/middleware/util/Util.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/generationcp/middleware/util/Util.java b/src/main/java/org/generationcp/middleware/util/Util.java index d819760e19..4889755621 100644 --- a/src/main/java/org/generationcp/middleware/util/Util.java +++ b/src/main/java/org/generationcp/middleware/util/Util.java @@ -196,7 +196,7 @@ public static Date getCurrentDate() { * @return calendar instance */ public static Calendar getCalendarInstance() { - Locale currentLocale = Locale.getDefault(Locale.Category.DISPLAY); + Locale currentLocale = Locale.getDefault(); return Calendar.getInstance(currentLocale); } @@ -215,7 +215,7 @@ public static String getCurrentDateAsStringValue(String format) { * @return SimpleDateFormat */ public static SimpleDateFormat getSimpleDateFormat(String format) { - Locale currentLocale = Locale.getDefault(Locale.Category.DISPLAY); + Locale currentLocale = Locale.getDefault(); SimpleDateFormat formatter = new SimpleDateFormat(format, currentLocale); formatter.setLenient(false); return formatter;