Search code examples
gogo-gorm

why created_at,update_at not same as my local time gorm golang?


I am using gorm http://jinzhu.me/gorm/ to handle database in my golang project. When i update a record, the update_at time is not same as my local time server. How do i solve it??


Solution

  • I found my issue. When connect to database, i miss "&loc=Local" parameter. And it causes my above problem. Thanks for watching!