Using go version go1.3.3 linux/amd64
func main() {
t := time.Now()
fmt.Printf("time: %v; format: %s\n", t, t.Format("20080101 10:00:00.000"))
}
Prints:
time: 2015-01-09 17:06:02.033307544 +0000 UTC; format: 90080101 10:00:00.033
I want YYYYMMDD, but time.Format is only layout by example, so it cannot know what digits mean year, month, day. I have to do it by hand.