From b0ebb680f92c29c43f5e8d6823cd2021609e70f8 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期五, 29 三月 2024 14:20:42 +0800
Subject: [PATCH] Time 协议返回数字格式的时间

---
 controller/systemCtl.go |    4 +++-
 vo/message.go           |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/controller/systemCtl.go b/controller/systemCtl.go
index 9fa0a77..8904214 100644
--- a/controller/systemCtl.go
+++ b/controller/systemCtl.go
@@ -5,6 +5,7 @@
 	"gat1400Exchange/pkg/logger"
 	"gat1400Exchange/service"
 	"net/http"
+	"strconv"
 	"time"
 
 	"gat1400Exchange/config"
@@ -109,9 +110,10 @@
 
 // 鏃堕棿鏍″噯
 func (s SystemController) Time(c *gin.Context) {
+	iTime, _ := strconv.ParseInt(time.Now().Format("20060102150405"), 10, 64)
 	rspMsg := vo.ResponseSystemTime{
 		VIIDServerID: config.ServeConf.ID,
-		LocalTime:    time.Now().Format("20060102150405"),
+		LocalTime:    iTime,
 	}
 
 	c.JSON(http.StatusOK, gin.H{"SystemTimeObject": rspMsg})
diff --git a/vo/message.go b/vo/message.go
index e566c61..ca03ea8 100644
--- a/vo/message.go
+++ b/vo/message.go
@@ -23,6 +23,6 @@
 type ResponseSystemTime struct {
 	VIIDServerID string
 	TimeMode     interface{}
-	LocalTime    string
+	LocalTime    int64
 	TimeZone     interface{}
 }

--
Gitblit v1.8.0