Explorar o código

When unmarshalling timestamps set null values to 0 time to be consistent with other types

Charles Law %!s(int64=9) %!d(string=hai) anos
pai
achega
734b8e8dfe
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      marshal.go

+ 1 - 0
marshal.go

@@ -1094,6 +1094,7 @@ func unmarshalTimestamp(info TypeInfo, data []byte, value interface{}) error {
 		return nil
 	case *time.Time:
 		if len(data) == 0 {
+			*v = time.Time{}
 			return nil
 		}
 		x := decBigInt(data)