æ·feat: commplete init process

This commit is contained in:
engigu
2023-12-30 17:40:20 +08:00
parent 9307bec4ab
commit 77af985b76
92 changed files with 12054 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
package util
import (
"time"
)
func TimeStampToYmdMHD(stamp int) string {
timestamp := int64(stamp)
timeObj := time.Unix(timestamp, 0)
formattedTime := timeObj.Format("2006-01-02 15:04:05")
return formattedTime
}
func GetNowTimeStampToYmdMHD() string {
now := time.Now().Unix()
timeObj := time.Unix(now, 0)
formattedTime := timeObj.Format("2006-01-02 15:04:05")
return formattedTime
}