timetable-extension #1

Open
fred.boniface wants to merge 160 commits from timetable-extension into main
2 changed files with 23 additions and 0 deletions
Showing only changes of commit 848f4bf7bd - Show all commits

22
src/cif/helpers.go Normal file
View File

@ -0,0 +1,22 @@
package cif
import (
"time"
"git.fjla.uk/owlboard/timetable-mgr/log"
"go.uber.org/zap"
)
func getDayString() string {
london, err := time.LoadLocation("Europe/London")
if err != nil {
log.Msg.Error("Unable to load time zone info", zap.Error(err))
}
timeNow := time.Now().In(london)
day := timeNow.Weekday()
dayStrings := [...]string{"sun", "mon", "tue", "wed", "thu", "fri", "sat"}
return dayStrings[day]
}

View File

@ -6,6 +6,7 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
"time" "time"
_ "time/tzdata"
"git.fjla.uk/owlboard/timetable-mgr/background" "git.fjla.uk/owlboard/timetable-mgr/background"
"git.fjla.uk/owlboard/timetable-mgr/dbAccess" "git.fjla.uk/owlboard/timetable-mgr/dbAccess"