diff options
Diffstat (limited to 'src/testcases/org')
4 files changed, 9 insertions, 5 deletions
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java b/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java index e74eedf8a7..b58b4cd8f0 100644 --- a/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java +++ b/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java @@ -28,6 +28,7 @@ import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import junit.framework.TestCase; @@ -227,7 +228,7 @@ public class TestWriteWellKnown extends TestCase { * (e.g. author, edit date, application name) and to the document * summary information (e.g. company, manager). */ - Calendar cal = new GregorianCalendar(); + Calendar cal = new GregorianCalendar(Locale.ROOT); cal.set(2000, 6, 6, 6, 6, 6); final long time1 = cal.getTimeInMillis(); cal.set(2001, 7, 7, 7, 7, 7); diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java index 2e34d6f602..7abd515743 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java @@ -25,6 +25,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; +import java.util.Locale; import java.util.TimeZone; import org.apache.poi.hssf.HSSFTestDataSamples; @@ -461,7 +462,7 @@ public final class TestHSSFDateUtil { * @param day one based */ private static Date createDate(int year, int month, int day, int hour, int minute, int second) { - Calendar c = new GregorianCalendar(); + Calendar c = new GregorianCalendar(Locale.ROOT); c.set(year, month, day, hour, minute, second); c.set(Calendar.MILLISECOND, 0); return c.getTime(); diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculator.java b/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculator.java index 22d3ba3492..abd8ba2ccd 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculator.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculator.java @@ -19,6 +19,7 @@ package org.apache.poi.ss.formula.atp; import java.util.Calendar; import java.util.GregorianCalendar; +import java.util.Locale; import junit.framework.TestCase; @@ -58,7 +59,7 @@ public final class TestYearFracCalculator extends TestCase { } private static double md(int year, int month, int day) { - Calendar c = new GregorianCalendar(); + Calendar c = new GregorianCalendar(Locale.ROOT); c.set(year, month-1, day, 0, 0, 0); c.set(Calendar.MILLISECOND, 0); diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestDays360.java b/src/testcases/org/apache/poi/ss/formula/functions/TestDays360.java index 15dd1246b1..db39c09c32 100644 --- a/src/testcases/org/apache/poi/ss/formula/functions/TestDays360.java +++ b/src/testcases/org/apache/poi/ss/formula/functions/TestDays360.java @@ -20,6 +20,7 @@ package org.apache.poi.ss.formula.functions; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; +import java.util.Locale; import junit.framework.AssertionFailedError; import junit.framework.TestCase; @@ -44,13 +45,13 @@ public final class TestDays360 extends TestCase { return cal.getTime(); } private static Date decrementDay(Date d) { - Calendar c = new GregorianCalendar(); + Calendar c = new GregorianCalendar(Locale.ROOT); c.setTimeInMillis(d.getTime()); c.add(Calendar.DAY_OF_MONTH, -1); return c.getTime(); } private static String fmt(Date d) { - Calendar c = new GregorianCalendar(); + Calendar c = new GregorianCalendar(Locale.ROOT); c.setTimeInMillis(d.getTime()); StringBuilder sb = new StringBuilder(); sb.append(c.get(Calendar.YEAR)); |