https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
Bug ID: 64179
Summary: [PATCH] Fix TestCellFormat.testApplyObjectDate() fail
in different time zone
Product: POI
Version: 4.1.2-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 37045
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37045&action=edit
It's a zip archive which includes diff result(diff.txt), the screenshot of the
failed test(fail.png), the screenshot of the resolved test(fix.png).
Due to the time zone, the test `TextCellFormat.testApplyObjectDate()` fails in
my machine. I'm in Asia/Seoul(UTC+9) zone.
> > Task :main:test
>
> expected:<1/1[1]/2012> but was:<1/1[0]/2012>
> Expected :1/11/2012
> Actual :1/10/2012
>
> org.junit.ComparisonFailure: expected:<1/1[1]/2012> but was:<1/1[0]/2012>
> at org.junit.Assert.assertEquals(Assert.java:117)
> at org.junit.Assert.assertEquals(Assert.java:146)
> at
> org.apache.poi.ss.format.TestCellFormat.testApplyObjectDate(TestCellFormat.java:856)
> ...
As `TestCellFormat.setTimeZone()` sets the user time zone to CET before tests,
I changed to SimpleDateFormat instance have set time zone CET also.
The attached file is a zip archive which includes diff result(diff.txt), the
screenshot of the failed test(fail.png), the screenshot of the resolved
test(fix.png).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]