changed -1 to +1
This commit is contained in:
parent
39de95e3ce
commit
f3636c15c9
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
|
@ -142,7 +142,7 @@ func scheduleTimetableUpdate() {
|
|||
// Ticker for scheduled lesson notifications
|
||||
startMinuteTicker(func() {
|
||||
now := time.Now()
|
||||
now = now.Add(-1 * time.Hour)
|
||||
now = now.Add(1 * time.Hour)
|
||||
if isScheduledTime(now) {
|
||||
log.Println("Scheduled time reached, running notifications...")
|
||||
accounts, _ := BotStart.LoadAndDecryptAccounts()
|
||||
|
|
@ -187,7 +187,7 @@ func Run(userID string) {
|
|||
subjectByStartTime, _ := MapTimeToSubject(timetableFile)
|
||||
|
||||
nowOld := time.Now()
|
||||
nowOld = nowOld.Add(-1 * time.Hour)
|
||||
nowOld = nowOld.Add(1 * time.Hour)
|
||||
now := nowOld.Format("15:04")
|
||||
nextTime, room, foundRoom := NextRoomForTime(roomByStartTime, now)
|
||||
if !foundRoom {
|
||||
|
|
|
|||
Loading…
Reference in a new issue