mirror of https://github.com/apache/poi.git
Bug 64179: Adjust to ensure a fixed timezone for date parsing in test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1874949 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee61d3eb56
commit
cbf7275a0d
|
@ -850,7 +850,9 @@ public class TestCellFormat {
|
||||||
@Test
|
@Test
|
||||||
public void testApplyObjectDate() throws ParseException {
|
public void testApplyObjectDate() throws ParseException {
|
||||||
CellFormat cf1 = CellFormat.getInstance("m/d/yyyy");
|
CellFormat cf1 = CellFormat.getInstance("m/d/yyyy");
|
||||||
Date date1 = new SimpleDateFormat("M/d/y", Locale.ROOT).parse("01/11/2012");
|
SimpleDateFormat sdf1 = new SimpleDateFormat("M/d/y", Locale.ROOT);
|
||||||
|
sdf1.setTimeZone(TimeZone.getTimeZone("CET"));
|
||||||
|
Date date1 = sdf1.parse("01/11/2012");
|
||||||
assertEquals("1/11/2012", cf1.apply(date1).text);
|
assertEquals("1/11/2012", cf1.apply(date1).text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue