We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8017304 commit 7b67b17Copy full SHA for 7b67b17
postgres.go
@@ -61,7 +61,7 @@ func (dialector Dialector) Initialize(db *gorm.DB) (err error) {
61
if dialector.Config.PreferSimpleProtocol {
62
config.PreferSimpleProtocol = true
63
}
64
- result := regexp.MustCompile("(time_zone|TimeZone)=(.*)($|&| )").FindStringSubmatch(dialector.Config.DSN)
+ result := regexp.MustCompile("(time_zone|TimeZone)=(.*?)($|&| )").FindStringSubmatch(dialector.Config.DSN)
65
if len(result) > 2 {
66
config.RuntimeParams["timezone"] = result[2]
67
0 commit comments