diff --git a/src/modules/monitor/service/system_info.go b/src/modules/monitor/service/system_info.go index 1f3fbdc9..a6e9a51d 100644 --- a/src/modules/monitor/service/system_info.go +++ b/src/modules/monitor/service/system_info.go @@ -6,7 +6,7 @@ type ISystemInfo interface { SystemInfo() map[string]any // TimeInfo 系统时间信息 - TimeInfo() map[string]any + TimeInfo() map[string]string // MemoryInfo 内存信息 MemoryInfo() map[string]any diff --git a/src/modules/monitor/service/system_info.impl.go b/src/modules/monitor/service/system_info.impl.go index 13f48b2a..597a5ab4 100644 --- a/src/modules/monitor/service/system_info.impl.go +++ b/src/modules/monitor/service/system_info.impl.go @@ -49,7 +49,7 @@ func (s *SystemInfoImpl) SystemInfo() map[string]any { } // TimeInfo 系统时间信息 -func (s *SystemInfoImpl) TimeInfo() map[string]any { +func (s *SystemInfoImpl) TimeInfo() map[string]string { now := time.Now() // 获取当前时间 current := now.Format("2006-01-02 15:04:05") @@ -58,7 +58,7 @@ func (s *SystemInfoImpl) TimeInfo() map[string]any { // 获取时区名称 timezoneName := now.Format("MST") - return map[string]any{ + return map[string]string{ "current": current, "timezone": timezone, "timezoneName": timezoneName,