zhangzengfei
2024-03-29 b0ebb680f92c29c43f5e8d6823cd2021609e70f8
Time 协议返回数字格式的时间
2个文件已修改
6 ■■■■■ 已修改文件
controller/systemCtl.go 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
vo/message.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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})
vo/message.go
@@ -23,6 +23,6 @@
type ResponseSystemTime struct {
    VIIDServerID string
    TimeMode     interface{}
    LocalTime    string
    LocalTime    int64
    TimeZone     interface{}
}