From d1f2ec91b0a5fc493671e20184a7b5215b5390ba Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 5 Sep 2022 02:45:18 +0300 Subject: [PATCH] Fix date Next FNN --- src/listener_mention.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/listener_mention.py b/src/listener_mention.py index c5939ee..eec11cd 100644 --- a/src/listener_mention.py +++ b/src/listener_mention.py @@ -26,13 +26,14 @@ def get_control_mention(): acct_mention = i['account']['acct'] reply_to_id = i['status']['in_reply_to_id'] if acct_mention in admins_bot and seen == False and reply_to_id == None and now_week in (0, 6): + time_now = datetime.now() st_id = i['status']['id'] st_date = i['status']['created_at'] thread_created_at = dateutilparse(st_date) delta = relativedelta(hour=hour_poll_posting, minute=0, second=0, weekday=TU(1)) next_movie_watching_delta = relativedelta(hour=fmn_next_watching_hour, minute=0, second=0, weekday=SU(1)) stop_thread_scan = thread_created_at + delta - next_movie_watching = thread_created_at + next_movie_watching_delta + next_movie_watching = time_now + next_movie_watching_delta max_mute_time = time.mktime(time.struct_time(next_movie_watching.timetuple())) next_movie_watching = next_movie_watching.strftime('%d.%m.%Y') movies_accept_time = stop_thread_scan.strftime('%H:%M %d.%m.%Y MSK')