diff --git a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java index d3d9330..30cf7f2 100644 --- a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java +++ b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java @@ -6,6 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; +import java.time.format.DateTimeFormatter; +import java.util.Calendar; import java.util.HashMap; @Repository @@ -20,9 +22,10 @@ this.bookManager = bookManager; this.bookManager.addListener(this); accountManager.addListener(this); - this.addSchedule("fish", 2024, 5, 28, "cinema", "10;00", "12:00", 0); + Calendar c = Calendar.getInstance(); + this.addSchedule("fish", c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 1, c.get(Calendar.DATE), "cinema", "10;00", "12:00", 0); this.addSchedule("fish", 2024, 5, 28, "test", "15;00", "18:00", 1); - this.addSchedule("bird", 2024, 5, 28, "cinema", "10;00", "12:00", 0); + this.addSchedule("bird", c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 1, c.get(Calendar.DATE), "cinema", "10;00", "12:00", 0); this.addSchedule("bird", 2024, 5, 28, "test", "15;00", "18:00", 1); }