code: def datetime_to_timestamp(time: datetime) -> Timestamp:
      
      protime = Timestamp()
      protime.FromDatetime(time)
      return protime
docs: Convert datetime to protobuf.timestamp.
  
      :param time: time
      :type time: ~datetime.datetime
      :return: protobuf.timestamp
      :rtype: ~google.protobuf.timestamp_pb2.Timestamp