[ Server ] accomplish alive status precedure

This commit is contained in:
zeaslity
2023-06-20 10:02:49 +08:00
parent 92a2a16aea
commit a96d3e51ac
33 changed files with 497 additions and 170 deletions

View File

@@ -4,13 +4,18 @@ import (
"time"
)
// CurTimeString 输出系统时间的格式为"2006-01-02 15:04:05"形式的时间字符串
func CurTimeString() string {
// ParseDateTimeTime 输出系统时间的格式为"2006-01-02 15:04:05"形式的时间字符串
func ParseDateTimeTime() string {
now := time.Now()
/*loc := time.FixedZone("UTC+8", 8*60*60) // 创建东八区时区对象
localTime := now.In(loc) // 转换为东八区时间*/
return now.Format("2006-01-02 15:04:05")
return now.Format(time.DateTime)
}
func ParseISOLocalDateTime() string {
now := time.Now()
return now.Format(time.RFC3339)
}