golang time打印出的值是62135596800的来源

' 减去62135596800是将“以公元1年1月1日0点为基准”改成“以1970年1月1日0点”为基准

所以,数据库datetime的默认值 : 0000-00-00 00:00:00 转化为time.Time 结构后,其Unix()时间戳是int64的,但是是负数,因为0是 1970年1月1日0点 .

http://blog.sina.com.cn/s/blog_53ed87c10100fq6b.html

原文地址:https://www.cnblogs.com/ayanmw/p/9048340.html