import time def time_delta_flag(publish_time_stamp, update_time_stamp, rule_dict): if ( int(time.time()) - publish_time_stamp > 3600 * 24 * int(rule_dict.get("period", {}).get("max", 1000)) ) and ( int(time.time()) - update_time_stamp > 3600 * 24 * int(rule_dict.get("period", {}).get("max", 1000)) ): # return False return True else: return True # 测试版本来判断时间戳 def judge_time_temp(publish_time_stamp): if int(time.time()) - publish_time_stamp > 3600 * 24 * 3: return False else: return True