def update_date_in_checkpoint(self):
        """Initialize new interval of date in checkpoint.

        Returns:
            json : Updated checkpoint.
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            applogger.info(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    "Setting new start date and end date in checkpoint file",
                )
            )

            checkpoint = self.get_checkpoint_data(self.state_manager, load_flag=True)

            utc_timestamp = (
                datetime.datetime.utcnow()
                .replace(tzinfo=datetime.timezone.utc)
                .isoformat()
            )
            start_date = checkpoint.get("end_time")
            mimecast_start_date = datetime.datetime.strptime(
                start_date, consts.TIME_FORMAT
            )

            checkpoint["start_time"] = mimecast_start_date.strftime(consts.TIME_FORMAT)
            end_date = datetime.datetime.fromisoformat(utc_timestamp)
            mimecast_end_date = end_date.strftime(consts.TIME_FORMAT)
            checkpoint["end_time"] = mimecast_end_date
            checkpoint["next"] = ""

            self.post_checkpoint_data(
                self.state_manager, data=checkpoint, dump_flag=True
            )
            self.start_date = checkpoint["start_time"]
            applogger.info(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    "Checkpoint updated with new start date and end date",
                )
            )

            return checkpoint["start_time"], checkpoint["end_time"]
        except MimecastException:
            raise MimecastException()
        except KeyError as key_error:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    consts.KEY_ERROR_MSG.format(key_error),
                )
            )
            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()
Initialize new interval of date in checkpoint.

        Returns:
            json : Updated checkpoint.
        
Solutions/Mimecast/Data Connectors/MimecastAudit/MimecastAudit/mimecast_audit_to_sentinel.py