Skip to content

Commit 2ee3271

Browse files
author
Yoan Blanc
committed
dateutil: comparing string representations to avoid microseconds
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
1 parent af8debf commit 2ee3271

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

utils/src/test/java/com/cloud/utils/DateUtilTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void zonedTimeFormatLegacy() throws ParseException {
5656
String str = dfDate.format(time);
5757
Date dtParsed = DateUtil.parseTZDateString(str);
5858

59-
assertEquals(time, dtParsed);
59+
assertEquals(time.toString(), dtParsed.toString());
6060
}
6161

6262
@Test
@@ -66,6 +66,6 @@ public void zonedTimeFormat() throws ParseException {
6666
String str = dfDate.format(time);
6767
Date dtParsed = DateUtil.parseTZDateString(str);
6868

69-
assertEquals(time, dtParsed);
69+
assertEquals(time.toString(), dtParsed.toString());
7070
}
7171
}

0 commit comments

Comments
 (0)