Skip to content

Commit

Permalink
Set default time format in form binding (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
lokhman authored and appleboy committed Aug 17, 2018
1 parent 40ab9de commit 7eb0f74
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 7eb0f74

Please sign in to comment.