From 840b754d3704480349b5b2dc0c4658e58edce594 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 25 Oct 2023 17:06:48 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=B3=BB=E7=BB=9F=E4=BF=A1=E6=81=AFan?= =?UTF-8?q?y=E7=B1=BB=E5=9E=8B=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/monitor/service/system_info.go | 2 +- src/modules/monitor/service/system_info.impl.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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,