![](/style/images/good.png)
1
![](/style/images/bad.png)
【笔记】Go获取当前时间
source link: https://loli.fj.cn/2023/04/06/Go%E8%8E%B7%E5%8F%96%E5%BD%93%E5%89%8D%E6%97%B6%E9%97%B4/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
【笔记】Go获取当前时间
2023-04-06
Go获取当前时间
日期类型当前时间
time.Now()
格式化日期类型为字符串类型
2006
:相当于yyyy01
:相当于MM02
:相当于dd15
:相当于24小时制的hh04
:相当于mm05
:相当于ss
time.Now().Format("2006-01-02 15:04:05")
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK