随笔

Golang some point

time format

usually, will try time.Format("YYYY-MM-DD HH:mm"),but this is a different。2006-01-02 15:04:05 is go birth time,then the creator make it to time format layout。

// you will get like 2006-01-02 15:04:05 layout of current time.
// eg: 2019-04-23 22:57:09
time.Now().Format("2006-01-02 15:04:05")

本文链接:https://note.lilonghe.net//post/golang-some-point.html

-- EOF --