Set default time format in form binding (#1487)

This commit is contained in:
Alexander Lokhman 2018-08-17 02:41:56 +01:00 committed by Bo-Yi Wu
parent 40ab9de4b5
commit 7eb0f74b89
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ func setFloatField(val string, bitSize int, field reflect.Value) error {
func setTimeField(val string, structField reflect.StructField, value reflect.Value) error { func setTimeField(val string, structField reflect.StructField, value reflect.Value) error {
timeFormat := structField.Tag.Get("time_format") timeFormat := structField.Tag.Get("time_format")
if timeFormat == "" { if timeFormat == "" {
return errors.New("Blank time format") timeFormat = time.RFC3339
} }
if val == "" { if val == "" {