mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
fix timelocation for windows
This commit is contained in:
@@ -359,7 +359,12 @@ func (s *SettingService) GetTimeLocation() (*time.Location, error) {
|
||||
if err != nil {
|
||||
defaultLocation := defaultValueMap["timeLocation"]
|
||||
logger.Errorf("location <%v> not exist, using default location: %v", l, defaultLocation)
|
||||
return time.LoadLocation(defaultLocation)
|
||||
location, err = time.LoadLocation(defaultLocation)
|
||||
if err != nil {
|
||||
logger.Errorf("failed to load default location, using UTC: %v", err)
|
||||
return time.UTC, nil
|
||||
}
|
||||
return location, nil
|
||||
}
|
||||
return location, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user