bug fixed & comment trace line

This commit is contained in:
Lunny Xiao 2015-08-12 23:11:45 +08:00
parent b3ec16b09c
commit 97e7703766
1 changed files with 2 additions and 2 deletions

View File

@ -1767,7 +1767,7 @@ func (session *Session) _row2Bean(rows *core.Rows, fields []string, fieldsCount
t := vv.Convert(core.TimeType).Interface().(time.Time) t := vv.Convert(core.TimeType).Interface().(time.Time)
z, _ := t.Zone() z, _ := t.Zone()
if len(z) == 0 || t.Year() == 0 { // !nashtsai! HACK tmp work around for lib/pq doesn't properly time with location if len(z) == 0 || t.Year() == 0 { // !nashtsai! HACK tmp work around for lib/pq doesn't properly time with location
session.Engine.LogDebug("empty zone key[%v] : %v | zone: %v | location: %+v\n", key, t, z, *t.Location()) session.Engine.LogDebugf("empty zone key[%v] : %v | zone: %v | location: %+v\n", key, t, z, *t.Location())
t = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(),
t.Minute(), t.Second(), t.Nanosecond(), time.Local) t.Minute(), t.Second(), t.Nanosecond(), time.Local)
} }
@ -1789,7 +1789,7 @@ func (session *Session) _row2Bean(rows *core.Rows, fields []string, fieldsCount
// !<winxxp>! 增加支持sql.Scanner接口的结构如sql.NullString // !<winxxp>! 增加支持sql.Scanner接口的结构如sql.NullString
hasAssigned = true hasAssigned = true
if err := nulVal.Scan(vv.Interface()); err != nil { if err := nulVal.Scan(vv.Interface()); err != nil {
fmt.Println("sql.Sanner error:", err.Error()) //fmt.Println("sql.Sanner error:", err.Error())
session.Engine.LogError("sql.Sanner error:", err.Error()) session.Engine.LogError("sql.Sanner error:", err.Error())
hasAssigned = false hasAssigned = false
} }