Open
Description
The protobuf library maps a nil timestamp to Jan. 1st, 1970 at midnight UTC and makes IsZero() false. One side effect is that the cli cardOmitEmpty
and omitEmpty
no longer filter timestamps that have not been initialized. This is also a problem for users of the raw grpc API.
(*timestamppb.Timestamp)(nil).AsTime().IsZero() // FALSE!
The solution is to check with IsValid()
before calling AsTime()