1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-29 19:01:29 +00:00

Merge pull request #3388 from s00500/develop

Closes #2515 Autodetect timezone in NewOrmWithDB()
This commit is contained in:
astaxie 2018-11-13 16:48:18 +08:00 committed by GitHub
commit cfe54a02c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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