code: 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()
docs: Extract the generated datetime from the notification.