From f4c4d890d6e22eaf66bffab3da1b46b9e4c4782f Mon Sep 17 00:00:00 2001 From: etrandafir93 <75391049+etrandafir93@users.noreply.github.com> Date: Tue, 19 Apr 2022 01:13:13 +0200 Subject: [PATCH] BAEL-5465: changed example to LocalDateTime (#12086) --- .../baeldung/subtractdays/SubtractDaysFromDateUnitTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/subtractdays/SubtractDaysFromDateUnitTest.java b/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/subtractdays/SubtractDaysFromDateUnitTest.java index 9afb6e8db0..91cd29cd54 100644 --- a/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/subtractdays/SubtractDaysFromDateUnitTest.java +++ b/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/subtractdays/SubtractDaysFromDateUnitTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals; import java.text.SimpleDateFormat; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; @@ -15,7 +16,7 @@ public class SubtractDaysFromDateUnitTest { @Test public void givenLocalDateTime_whenSubtractingFiveDays_dateIsChangedCorrectly() { - LocalDate localDateTime = LocalDate.of(2022, 4, 20); + LocalDateTime localDateTime = LocalDateTime.of(2022, 4, 20, 0, 0); localDateTime = localDateTime.minusDays(5);