Skip to content

Commit 255c461

Browse files
Fix VMScheduler unit test for daylight saving time (#11907)
1 parent e333ce9 commit 255c461

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/test/java/org/apache/cloudstack/vm/schedule/VMSchedulerImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public void testScheduleNextJobScheduleFutureScheduleWithTimeZoneChecks() throws
238238
Date expectedScheduledTime = Date.from(zonedDateTime.toInstant());
239239

240240
if (expectedScheduledTime.before(startDate)) {
241-
expectedScheduledTime = DateUtils.addDays(expectedScheduledTime, 1);
241+
expectedScheduledTime = Date.from(zonedDateTime.plusDays(1).toInstant());
242242
}
243243

244244
Date actualScheduledTime = vmScheduler.scheduleNextJob(vmSchedule, new Date());

0 commit comments

Comments
 (0)