fix build for windows

This commit is contained in:
Alireza Ahmadi
2025-08-21 00:47:09 +02:00
parent 7bc7468cf3
commit 123813dc90
5 changed files with 122 additions and 49 deletions
+4
View File
@@ -3,6 +3,7 @@ package service
import (
"encoding/json"
"os"
"runtime"
"s-ui/config"
"s-ui/database"
"s-ui/database/model"
@@ -245,6 +246,9 @@ func (s *SettingService) GetTimeLocation() (*time.Location, error) {
if err != nil {
return nil, err
}
if runtime.GOOS == "windows" {
l = "Local"
}
location, err := time.LoadLocation(l)
if err != nil {
defaultLocation := defaultValueMap["timeLocation"]