changed -1 to +1

This commit is contained in:
Jannover5000r 2025-10-29 14:22:04 +01:00
parent 39de95e3ce
commit f3636c15c9

View file

@ -142,7 +142,7 @@ func scheduleTimetableUpdate() {
// Ticker for scheduled lesson notifications // Ticker for scheduled lesson notifications
startMinuteTicker(func() { startMinuteTicker(func() {
now := time.Now() now := time.Now()
now = now.Add(-1 * time.Hour) now = now.Add(1 * time.Hour)
if isScheduledTime(now) { if isScheduledTime(now) {
log.Println("Scheduled time reached, running notifications...") log.Println("Scheduled time reached, running notifications...")
accounts, _ := BotStart.LoadAndDecryptAccounts() accounts, _ := BotStart.LoadAndDecryptAccounts()
@ -187,7 +187,7 @@ func Run(userID string) {
subjectByStartTime, _ := MapTimeToSubject(timetableFile) subjectByStartTime, _ := MapTimeToSubject(timetableFile)
nowOld := time.Now() nowOld := time.Now()
nowOld = nowOld.Add(-1 * time.Hour) nowOld = nowOld.Add(1 * time.Hour)
now := nowOld.Format("15:04") now := nowOld.Format("15:04")
nextTime, room, foundRoom := NextRoomForTime(roomByStartTime, now) nextTime, room, foundRoom := NextRoomForTime(roomByStartTime, now)
if !foundRoom { if !foundRoom {