This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 255c4615dd9 Fix VMScheduler unit test for daylight saving time (#11907)
255c4615dd9 is described below

commit 255c4615dd929f0f8831888756ea4ee7d0cd91d3
Author: Suresh Kumar Anaparti <[email protected]>
AuthorDate: Fri Oct 24 19:38:32 2025 +0530

    Fix VMScheduler unit test for daylight saving time (#11907)
---
 .../java/org/apache/cloudstack/vm/schedule/VMSchedulerImplTest.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/server/src/test/java/org/apache/cloudstack/vm/schedule/VMSchedulerImplTest.java
 
b/server/src/test/java/org/apache/cloudstack/vm/schedule/VMSchedulerImplTest.java
index c51f07e96f7..3f9ffc714a1 100644
--- 
a/server/src/test/java/org/apache/cloudstack/vm/schedule/VMSchedulerImplTest.java
+++ 
b/server/src/test/java/org/apache/cloudstack/vm/schedule/VMSchedulerImplTest.java
@@ -238,7 +238,7 @@ public class VMSchedulerImplTest {
         Date expectedScheduledTime = Date.from(zonedDateTime.toInstant());
 
         if (expectedScheduledTime.before(startDate)) {
-            expectedScheduledTime = DateUtils.addDays(expectedScheduledTime, 
1);
+            expectedScheduledTime = 
Date.from(zonedDateTime.plusDays(1).toInstant());
         }
 
         Date actualScheduledTime = vmScheduler.scheduleNextJob(vmSchedule, new 
Date());

Reply via email to