Pārlūkot izejas kodu

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

Charles Law 9 gadi atpakaļ
vecāks
revīzija
734b8e8dfe
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  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)