Golang JSON Unmarshal MySQL datetime to time.Time

前端之家收集整理的这篇文章主要介绍了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?
  2. @H_502_35@ 原文链接:https://www.f2er.com/go/188283.html

猜你在找的Go相关文章