def get_last_polled_time(self, historical_days):
        """ 
            gets the last updated time,
            for historical poll takes user input value or default value of 10 days
        """

        try:
            day = int(historical_days)
        except Exception:
            day = constant.DAYS
        current_time = datetime.utcnow() - timedelta(minutes=constant.MINUTE)
        past_time = self.get()
        if past_time is not None:
            logger.info("The last time point is: {}".format(past_time))
        else:
            logger.info("There is no last time point, trying to get events from last " + str(day) + " days.")
            past_time = (current_time - timedelta(days=day)).strftime("%Y-%m-%dT%H:%M:%S.000Z")
        self.post(current_time.strftime("%Y-%m-%dT%H:%M:%S.000Z"))
        return (past_time, current_time.strftime("%Y-%m-%dT%H:%M:%S.000Z"))
 
            gets the last updated time,
            for historical poll takes user input value or default value of 10 days
        
Solutions/Digital Shadows/Data Connectors/Digital Shadows/DigitalShadowsConnectorAzureFunction/state_serializer.py