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 salamer
parent 4e28f1efea
commit 64ecab2453

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 {
timeFormat := structField.Tag.Get("time_format")
if timeFormat == "" {
return errors.New("Blank time format")
timeFormat = time.RFC3339
}
if val == "" {