From d02170e3cb8c0eb6a84bfec5e35efe82a06e8661 Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Mon, 12 Nov 2018 10:18:05 +0100 Subject: [PATCH] Closes #2515 Autodetect timezone in NewOrmWithDB() --- orm/orm.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/orm/orm.go b/orm/orm.go index e59589aa..b00c974e 100644 --- a/orm/orm.go +++ b/orm/orm.go @@ -548,6 +548,9 @@ func NewOrmWithDB(driverName, aliasName string, db *sql.DB) (Ormer, error) { al.Name = aliasName al.DriverName = driverName + al.DB = db + + detectTZ(al) o := new(orm) o.alias = al