Skip to content

Commit 6759a9c

Browse files
committed
Merge branch 'develop'
2 parents ab7bf69 + fe89885 commit 6759a9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

encoding/encoder.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"reflect"
88
"runtime"
99
"sort"
10+
"time"
1011
)
1112

1213
// Encode returns the encoded value of v.
@@ -45,6 +46,9 @@ func encode(v reflect.Value) (reflect.Value, error) {
4546

4647
// Special cases
4748
// Time should not be encoded as it is handled by the Expr method
49+
if v.Type() == reflect.TypeOf(time.Time{}) {
50+
return v, nil
51+
}
4852
for _, hook := range encodeHooks {
4953
success, ret, err := hook(v)
5054
if err != nil {

0 commit comments

Comments
 (0)