@staticmethod
    def _extract_when(body):

        # NOTE: I am keeping the logic the same as it was in openstack
        # code, However, *ALL* notifications should have a 'timestamp'
        # field, it's part of the notification envelope spec. If this was
        # put here because some openstack project is generating notifications
        # without a timestamp, then that needs to be filed as a bug with the
        # offending project (mdragon)
        when = body.get('timestamp', body.get('_context_timestamp'))
        if when:
            return Datatype.datetime.convert(when)
        return utcnow()
Extract the generated datetime from the notification.
dataset/ETHPy150Open openstack/stacktach-stackdistiller/stackdistiller/distiller.py/EventDefinition._extract_when