def show(self, req, id):
        context = req.environ['nova.context']
        authorize(context)
        try:
            if '.' in id:
                before_date = datetime.datetime.strptime(str(id),
                                                "%Y-%m-%d %H:%M:%S.%f")
            else:
                before_date = datetime.datetime.strptime(str(id),
                                                "%Y-%m-%d %H:%M:%S")
        except __HOLE__:
            msg = _("Invalid timestamp for date %s") % id
            raise webob.exc.HTTPBadRequest(explanation=msg)
        task_log = self._get_audit_task_logs(context,
                                                     before=before_date)
        return {'instance_usage_audit_log': task_log}
dataset/ETHPy150Open openstack/nova/nova/api/openstack/compute/legacy_v2/contrib/instance_usage_audit_log.py/InstanceUsageAuditLogController.show