Skip to content

Commit

Permalink
Set default time format in form binding (gin-gonic#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
lokhman authored and salamer committed Aug 18, 2018
1 parent 4e28f1e commit 64ecab2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binding/form_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down

0 comments on commit 64ecab2

Please sign in to comment.