-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I added the following test to OleAutomationDateUtilTest
assertThat("Day 2015"
, oadu.fromOADate(42095.99407407407, GMT)
, equalTo(d("Apr 1, 2015 11:51:27 pm GMT")));and I get the following error
java.lang.AssertionError: Day 2015
Expected: <Thu Apr 02 01:51:27 CEST 2015>
but: was <Thu Apr 02 01:51:27 CEST 2015>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
The dates look the same but they differ in their milliseconds.
I wrote my own method similar to fromOADate(double d, TimeZone tz) and pull out days, hours, minutes and seconds one by one out of the fraction ignoring millis and anything smaller (can't share it, sorry, but you get the idea).
It would be interesting if you can reproduce the error by copying the lines above into your test.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels