执行案例4.20中的fmt.Println(t.Format("21 Dec 2011 08:52"))无法得到预期结果
1. 运行环境
GO 1.21
2. 问题描述?
执行案例4.20中的fmt.Println(t.Format(“21 Dec 2011 08:52”))无法得到预期结果
代码:
package main
import (
"fmt"
"time"
)
func main() {
t := time.Now()
fmt.Println(t.Format("21 Dec 2011 08:52"))
}
3. 您期望得到的结果?
如案例中注释的时间格式,如:
20 Dec 2023 08:40
4. 您实际得到的结果?
209 Dec 20099 08:1920
推荐文章: