fix: fixed data statistic datetime to CST

This commit is contained in:
engigu
2024-01-26 10:14:07 +08:00
parent 63978a975e
commit b76bbb6e09
4 changed files with 28 additions and 13 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ var LatestVersion = map[string]string{}
//13. 支持更多的api接入示例
//`
var LatestVersionS = "v0.0.9"
var LatestVersionS = "v0.1.0"
var LatestVersionDesc = `
1. 单应用打包
2. 支持邮件发送
+8
View File
@@ -53,3 +53,11 @@ func (t *Time) Scan(v interface{}) error {
}
return fmt.Errorf("can not convert %v to timestamp", v)
}
// GetNowTimeStr 获取当前的时间字符串
func GetNowTimeStr() string {
currentTimeUTC := time.Now().UTC()
chinaTime := currentTimeUTC.Add(8 * time.Hour)
formattedTime := chinaTime.Format("2006-01-02 15:04:05")
return formattedTime
}