开发过程积累

过程记录

Posted by 大攀 on Friday, May 21, 2021

TOC

Go

1.时区问题

time.Parse(layout, value string) (Time, error)  // Parse returns a time in UTC.
time.ParseInLocation(layout, value string, loc *Location) (Time, error)  // ParseInLocation uses the given location.

gorm

  1. Updates

  gorm 的 Updates 如果你传的是一个 struct ,gorm 默认是不更新“零值”字段的。


comments powered by Disqus