fix 2 #15

Merged
Jannover5000r merged 1 commit from feature-UpdateAt2Am into main 2026-08-24 03:10:15 +02:00
2 changed files with 1 additions and 13 deletions

View file

@ -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) {

View file

@ -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)
}
}