fn is_follow_time_expired(followed_summoner: &SummonerFollowedData) -> boolExpand description
⚙️ Function: Determines if the follow time for a summoner has expired.
This function checks whether the current timestamp exceeds the stored follow end time for a summoner.
It parses the time_end_follow field from the SummonerFollowedData struct, compares it to the current UTC timestamp,
and returns true if the follow time has expired, or false otherwise.
§Parameters:
followed_summoner: A reference to aSummonerFollowedDatastruct, which contains information about the summoner, including when the follow period ends.
§Returns:
bool: Returnstrueif the current time is greater than the storedtime_end_follow, meaning the follow period has expired. Returnsfalseif the follow period is still active.
§Example:
This function is used to determine whether a summoner should be removed from the list of followed summoners.
let expired = is_follow_time_expired(&followed_summoner);
if expired {
// Remove summoner from database
}§Notes:
- The function uses UTC time for comparison and assumes the
time_end_followis a valid timestamp that can be parsed into ani64. If parsing fails, it defaults to 0, which will always result intrue.