from datetime import datetime


def S3FeedKeyDT(objKey):
  """Extracts a datetime from an S3 Protobuf file key
  """

  dtval = objKey[-18:-3] # Naming assumed: 'pb/<Feed Name>/YYYYMMDD/HHMMSS.pb2'
  dt = datetime.strptime(dtval, "%Y%m%d/%H%M%S")
  return dt