update latest xorm version to vendor (#2353)

This commit is contained in:
Lunny Xiao 2017-08-22 19:39:52 +08:00 committed by Lauris BH
parent 5c29b0a5fe
commit 2c6a0fdca8
44 changed files with 1748 additions and 1414 deletions

View file

@ -17,7 +17,7 @@ import (
const (
// Version show the xorm's version
Version string = "0.6.2.0412"
Version string = "0.6.3.0713"
)
func regDrvsNDialects() bool {
@ -50,10 +50,13 @@ func close(engine *Engine) {
engine.Close()
}
func init() {
regDrvsNDialects()
}
// NewEngine new a db manager according to the parameter. Currently support four
// drivers
func NewEngine(driverName string, dataSourceName string) (*Engine, error) {
regDrvsNDialects()
driver := core.QueryDriver(driverName)
if driver == nil {
return nil, fmt.Errorf("Unsupported driver name: %v", driverName)
@ -89,6 +92,12 @@ func NewEngine(driverName string, dataSourceName string) (*Engine, error) {
tagHandlers: defaultTagHandlers,
}
if uri.DbType == core.SQLITE {
engine.DatabaseTZ = time.UTC
} else {
engine.DatabaseTZ = time.Local
}
logger := NewSimpleLogger(os.Stdout)
logger.SetLevel(core.LOG_INFO)
engine.SetLogger(logger)