golang

godoc -http=:8080

http://localhost:8080/pkg/

##time

//时间格式化2006-01-02 15:04:05 不要变 必须是这个时间点, 据说是go诞生之日, 记忆方法:6-1-2-3-4-5

fmt.Println(time.Now().Format("2006-01-02 15:04:05"))

str_time := time.Unix(1389058332, 0).Format("2006-01-02 15:04:05")
the_time, err := time.Parse("2006-01-02 15:04:05", str_time)
unix_time := the_time.Unix()
posted @ 2017-12-20 16:09  anjunact  阅读(93)  评论(0编辑  收藏  举报