Commit 83d4385f authored by Guohua Ouyang's avatar Guohua Ouyang

Support time.RFC3339

Signed-off-by: 's avatarGuohua Ouyang <guohuaouyang@gmail.com>
parent 49fffe3e
......@@ -362,7 +362,10 @@ func parseFormToStruct(form url.Values, objT reflect.Type, objV reflect.Value) e
t time.Time
err error
)
if len(value) >= 19 {
if len(value) >= 25 {
value = value[:25]
t, err = time.ParseInLocation(time.RFC3339, value, time.Local)
} else if len(value) >= 19 {
value = value[:19]
t, err = time.ParseInLocation(formatDateTime, value, time.Local)
} else if len(value) >= 10 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment