func TimestampProto(t time.Time) (*timestamppb.Timestamp, error) {
	ts := &timestamppb.Timestamp{
		Seconds: t.Unix(),
		Nanos:   int32(t.Nanosecond()),
	}
	if err := validateTimestamp(ts); err != nil {
		return nil, err
	}
	return ts, nil
}
// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
// It returns an error if the resulting Timestamp is invalid.
TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
It returns an error if the resulting Timestamp is invalid.
// TimestampProto converts the time . Time to a google . protobuf . Timestamp proto . // It returns an error if the resulting Timestamp is invalid .
func TimestampProto(t time.Time) (*timestamppb.Timestamp, error) {
	ts := &timestamppb.Timestamp{
		Seconds: t.Unix(),
		Nanos:   int32(t.Nanosecond()),
	}
	if err := validateTimestamp(ts); err != nil {
		return nil, err
	}
	return ts, nil
}
func TimestampProto ( t time . Time ) ( * timestamppb . Timestamp , error ) { ts := & timestamppb . Timestamp { Seconds : t . Unix ( ) , Nanos : int32 ( t . Nanosecond ( ) ) , } if err := validateTimestamp ( ts ) ; err != nil { return nil , err } return ts , nil }
TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
TimestampProto converts the time . Time to a google . protobuf . Timestamp proto .