Golang JSON Unmarshal MySQL datetime to time.Time

json.Unmarshal uses RFC3339 to decode MySQL datetime type into time.Time.

Json snippet

"Datetime": "2017-07-06T17:27:00Z"

Wrong

"Datetime": "2017-07-06 17:27:00"

or

"Datetime": "2017-07-06T17:27:00"

Reference

  1. json.Unmarshal uses RFC3339 to decode datetime but why mine is not working?

相关文章

Golang的文档和社区资源:为什么它可以帮助开发人员快速上手...
Golang:AI 开发者的实用工具
Golang的标准库:为什么它可以大幅度提高开发效率?
Golang的部署和运维:如何将应用程序部署到生产环境中?
高性能AI开发:Golang的优势所在
本篇文章和大家了解一下go语言开发优雅得关闭协程的方法。有...