def METHOD_NAME(self) -> datetime.datetime:
    last_seen_fd: TextIO
    try:
        logger.debug("loading date from {}", self.cache_file)
        with open_file(self.cache_file) as last_seen_fd:
            file_data = last_seen_fd.readline().strip()
            parsed_date = datetime.datetime.strptime(  # noqa: DTZ007
                file_data, DT_FORMAT,
            )
            logger.debug("data: {}, parsed: {}", file_data, parsed_date)
            return parsed_date
    except (OSError, ValueError):
        # if file doesn't exist or corrupted,
        # this feature was run the first time
        # then we get take the date from the last installed package:
        last_pkg_date: datetime.datetime = datetime.datetime.fromtimestamp(
            PackageDB.get_last_installed_package_date(),
            tz=DEFAULT_TIMEZONE,
        )
        time_formatted: str = last_pkg_date.strftime(DT_FORMAT)
        try:
            with open_file(self.cache_file, "w") as last_seen_fd:
                last_seen_fd.write(time_formatted)
        except OSError:
            print_error(translate("Could not initialize {}").format(self.cache_file))
        return last_pkg_date