NOW is also including the hour, minute and second count instead of only the date, hence more precise than curdate for this case

This commit is contained in:
jenz 2026-03-01 21:03:19 +01:00
parent e2c9920616
commit 072b1e31f6

View File

@ -20,7 +20,7 @@ def check_if_oldest_timestamp_older_than_week():
with get_connection_unloze_playtime() as conn:
with conn.cursor() as cur:
sql_statement = f"""
SELECT MIN(inserted_on) < CURDATE() - INTERVAL 7 DAY AS is_older_than_week, MIN(inserted_on) as oldest_timestamp
SELECT MIN(inserted_on) < NOW() - INTERVAL 7 DAY AS is_older_than_week, MIN(inserted_on) as oldest_timestamp
FROM unloze_playtimestats.player_activity_ze
"""
cur.execute(sql_statement)