198
社区成员
发帖
与我相关
我的任务
分享Go语言的时间日期与时间的格式化,为什么这么特殊,什么原因
package main
import (
"fmt"
"time"
)
func main() {
now := time.Now()
fmt.Println(now.Format("2006-01-02 15:04:05"))
}
//2022-11-10 18:43:22
日期和时间修改成其他都不行?
不想安装Go的,也可以直接在线运行
https://golang.google.cn/play/