mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:00:55 +00:00
Fix UT
This commit is contained in:
parent
1cb0ff560d
commit
9472cba6c9
@ -1361,7 +1361,7 @@ setValue:
|
|||||||
for i := 0; i < *fi.timePrecision; i++ {
|
for i := 0; i < *fi.timePrecision; i++ {
|
||||||
layout += "0"
|
layout += "0"
|
||||||
}
|
}
|
||||||
t, err = time.ParseInLocation(layout, s, tz)
|
t, err = time.ParseInLocation(layout, s[:20+*fi.timePrecision], tz)
|
||||||
} else if len(s) >= 19 {
|
} else if len(s) >= 19 {
|
||||||
s = s[:19]
|
s = s[:19]
|
||||||
t, err = time.ParseInLocation(formatDateTime, s, tz)
|
t, err = time.ParseInLocation(formatDateTime, s, tz)
|
||||||
|
@ -52,6 +52,7 @@ var sqliteTypes = map[string]string{
|
|||||||
"string-text": "text",
|
"string-text": "text",
|
||||||
"time.Time-date": "date",
|
"time.Time-date": "date",
|
||||||
"time.Time": "datetime",
|
"time.Time": "datetime",
|
||||||
|
"time.Time-precision": "datetime(%d)",
|
||||||
"int8": "tinyint",
|
"int8": "tinyint",
|
||||||
"int16": "smallint",
|
"int16": "smallint",
|
||||||
"int32": "integer",
|
"int32": "integer",
|
||||||
|
@ -506,7 +506,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Debug, _ = StrTo(DBARGS.Debug).Bool()
|
// Debug, _ = StrTo(DBARGS.Debug).Bool()
|
||||||
|
Debug = true
|
||||||
|
|
||||||
if DBARGS.Driver == "" || DBARGS.Source == "" {
|
if DBARGS.Driver == "" || DBARGS.Source == "" {
|
||||||
fmt.Println(helpinfo)
|
fmt.Println(helpinfo)
|
||||||
|
Loading…
Reference in New Issue
Block a user