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
Timezone is stripped from time.Time when inserting into Postgres #96
Comments
https://github.com/gocraft/dbr/blob/master/dialect/mysql.go#L57
↓ (I want to change this line above to below...)
this may fix wrong time Create/Update problem not only in postgres but also in Mysql. buuut.. I found the following comment maybe we should create our own dialect(??)... |
We use |
I understand using UTC() for backward compatibility. For me, using UTC() is not an issue If the timezone is in However, is it also for backward compatibility reasons that the timezone is stripped from
If so, this is a dangerous function to call and I (embarrassingly) missed the timezone stripping. A low-hanging fruit would be having a comment highlighting that it is using UTC() and timezone agnostic? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
How? The dialect type is not exported... |
gocraft/dbr
implements time serialization incorrectly, it strips the time zone away fromtime.Time
, which results in wrong time stored in the database.The text was updated successfully, but these errors were encountered: