我看到我们的代码有这样使用parse的format
const baseFormat = "2006-01-02 15:04:05"
老师说这是golang中的特殊时间点,为什么呢?
我看到golang的文档上是这样写的
// Some valid layouts are invalid time values, due to format specifiers
// such as _ for space padding and Z for zone information.
// For example the RFC3339 layout 2006-01-02T15:04:05Z07:00
// contains both Z and a time zone offset in order to handle both valid options:
// 2006-01-02T15:04:05Z
// 2006-01-02T15:04:05+07:00
t, _ = time.Parse(time.RFC3339, "2006-01-02T15:04:05Z")
这个时间有什么特殊的意义吗?所有的时间format都不想用这个时间来作为format吗?
很多语言用“yyyy-mm-d HH:MM:SS”来作为format。