Temp timezone fix #11

Merged
Jannover5000r merged 22 commits from temp-timezoneFix into main 2026-08-23 00:02:29 +02:00
Showing only changes of commit f3636c15c9 - Show all commits

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 {