1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-20 10:40:19 +00:00

Merge pull request from s00500/develop

Closes  Autodetect timezone in NewOrmWithDB()
This commit is contained in:
astaxie
2018-11-13 16:48:18 +08:00
committed by GitHub

@ -548,6 +548,9 @@ func NewOrmWithDB(driverName, aliasName string, db *sql.DB) (Ormer, error) {
al.Name = aliasName al.Name = aliasName
al.DriverName = driverName al.DriverName = driverName
al.DB = db
detectTZ(al)
o := new(orm) o := new(orm)
o.alias = al o.alias = al