-
-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gorm Using carbon.Carbon will add one more time zone #243
Comments
The created_at stored in the database is 2024-07-04 11:17:00, and the value returned after JSON serialization is 2024-07-04 19:17:00. |
v2.4.0 has been fixed and released |
json.Unmarshal()转换的时间时区会变成time.UTC,这个是啥原因? |
Please post the code |
|
|
设置了全局默认设置
结构体声明
写入代码
数据库存入的 created_at 是 2024-07-04 11:17:00 JSON 序列化后返回的是 2024-07-04 19:17:00。
这里是不是要有个机制来处理一下,写入已经按照当地时区写入了,读取如果再加一次时区,会导致读出数据不正确的情况。
The text was updated successfully, but these errors were encountered: