This commit is contained in:
Jannover5000r 2026-08-24 03:09:29 +02:00
parent 6cfe550bed
commit 5f8f21732c
2 changed files with 1 additions and 13 deletions

View file

@ -7,7 +7,6 @@ import (
"log" "log"
"net/http" "net/http"
"os" "os"
"time"
"github.com/joho/godotenv" "github.com/joho/godotenv"
) )
@ -33,17 +32,6 @@ type LoginResponse struct {
var Url = os.Getenv("URL") 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 Password = os.Getenv("UNTIS_PASSWORD")
// var USERS = os.Getenv("UNTIS_USER") // var USERS = os.Getenv("UNTIS_USER")
func Main(user, password, userID string) { func Main(user, password, userID string) {

View file

@ -104,7 +104,7 @@ func init() {
locEnv := os.Getenv("LOCATION_ENV") locEnv := os.Getenv("LOCATION_ENV")
var locerr error var locerr error
Untis.Location, locerr = time.LoadLocation(locEnv) Untis.Location, locerr = time.LoadLocation(locEnv)
if err != nil { if locerr != nil {
log.Fatalf("Failed to load Timezone: %v", locerr) log.Fatalf("Failed to load Timezone: %v", locerr)
} }
} }