From 3fc436fe93016f8012e06de3a9a8b70ea76d57fd Mon Sep 17 00:00:00 2001 From: Jannover <90698896+Jannover5000r@users.noreply.github.com> Date: Sat, 22 Aug 2026 23:59:47 +0000 Subject: [PATCH 1/2] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 8b8e363..1c59a9d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -# Well, i guess this is not temporary anymore and will just become the new main - # Discord bot for logging Untis timetable to a Discord Webhook and Multiple accounts which can be added using !addaccount in a server whit the Bot ## create .env with Credentials -- 2.45.2 From 5f8f21732cd06f05ab3bc02c9500872b05c51796 Mon Sep 17 00:00:00 2001 From: Jannover5000r <90698896+Jannover5000r@users.noreply.github.com> Date: Mon, 24 Aug 2026 03:09:29 +0200 Subject: [PATCH 2/2] fix 2 --- Untis/Untis.go | 12 ------------ main.go | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Untis/Untis.go b/Untis/Untis.go index 51fe035..01f6324 100644 --- a/Untis/Untis.go +++ b/Untis/Untis.go @@ -7,7 +7,6 @@ import ( "log" "net/http" "os" - "time" "github.com/joho/godotenv" ) @@ -33,17 +32,6 @@ type LoginResponse struct { var Url = os.Getenv("URL") -var location *time.Location - -func init() { - godotenv.Load("../.env") - locEnv := os.Getenv("LOCATION_ENV") - if locEnv == "" { - locEnv = "UTC" - } - location, _ = time.LoadLocation(locEnv) -} - // var Password = os.Getenv("UNTIS_PASSWORD") // var USERS = os.Getenv("UNTIS_USER") func Main(user, password, userID string) { diff --git a/main.go b/main.go index 0fe0690..5b85c9e 100644 --- a/main.go +++ b/main.go @@ -104,7 +104,7 @@ func init() { locEnv := os.Getenv("LOCATION_ENV") var locerr error Untis.Location, locerr = time.LoadLocation(locEnv) - if err != nil { + if locerr != nil { log.Fatalf("Failed to load Timezone: %v", locerr) } } -- 2.45.2