Posted 2020-02-27Updated 2024-02-17 Jack Liu Goa few seconds read (About 61 words)Go:package timepackage timetime 转换注意事项Go语言指定时间原点123456789101112package mainimport ( "time" "fmt")func main() { //当前时间格式化,记忆规律:创始年份2016 | 一 | 二 | 三(15时,即 3 pm) | 四 | 五 nowTime := time.Now().Format("2006-01-02 15:04:05") fmt.Println(nowTime)}Go:package timehttps://www.defense.ink/b5c88baa.htmlAuthorJack LiuPosted on2020-02-27Updated on2024-02-17Licensed under#Gopackage time