def get_utc_time_in_past(self, days):
        """Generate time by subtracting days from current UTC time.

        Args:
            start_datetime (string): start of data fetching
        Returns:
            string : string of date days ago
        """
        try:
            __method_name = inspect.currentframe().f_code.co_name
            now = datetime.datetime.utcnow()
            offset_time = now - datetime.timedelta(days=days)
            offset_time = offset_time.replace(tzinfo=datetime.timezone.utc)
            applogger.info(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    "Successfully generated past UTC time ",
                )
            )
            return offset_time.strftime("%Y-%m-%dT%H:%M:%S%z")
        except MimecastException:
            raise MimecastException()
        except Exception as err:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    consts.UNEXPECTED_ERROR_MSG.format(err),
                )
            )
            raise MimecastException()
Generate time by subtracting days from current UTC time.

        Args:
            start_datetime (string): start of data fetching
        Returns:
            string : string of date days ago
        
Solutions/Mimecast/Data Connectors/MimecastAudit/MimecastAudit/mimecast_audit_to_sentinel.py