go-zero
go-zero copied to clipboard
Fix mongo's bson decoder timezone
Is your feature request related to a problem? Please describe. When I upgrade gozero's version, all my *time.Time data query from mongodb changes to UTC. I found the reason that mongo-driver's version has upgraded, the bson decoder decodes *time.Time as UTC by default.
Describe the solution you'd like
When we new a mongo collection, add a bsonOption called UseLocalTimeZone: true
.