From b1b5ecaa2e23c0c1d5e610200148e4e82595afdc Mon Sep 17 00:00:00 2001 From: shoko <270575765+shokollm@users.noreply.github.com> Date: Wed, 25 Mar 2026 06:20:13 +0000 Subject: [PATCH] polymarket-browse: fix relative time - show LIVE instead of In 0m when event is starting now --- skills/polymarket-browse/scripts/browse.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/skills/polymarket-browse/scripts/browse.py b/skills/polymarket-browse/scripts/browse.py index 49473a8..b3aceaa 100644 --- a/skills/polymarket-browse/scripts/browse.py +++ b/skills/polymarket-browse/scripts/browse.py @@ -256,7 +256,9 @@ def get_match_time_status(e): else: # Starts in future hours_until = delta.total_seconds() / 3600 - if hours_until < 1: + if hours_until <= 0: + return "LIVE", 3 + elif hours_until < 1: mins = int(delta.total_seconds() / 60) return f"In {mins}m", 3 elif hours_until < 24: @@ -293,7 +295,9 @@ def get_match_time_str(e): return f"{days}d ago" else: hours_until = delta.total_seconds() / 3600 - if hours_until < 1: + if hours_until <= 0: + return "LIVE" + elif hours_until < 1: mins = int(delta.total_seconds() / 60) return f"In {mins}m" elif hours_until < 24: @@ -437,7 +441,9 @@ def get_start_time_wib(e): rel_str = f"{days}d ago" else: hours_until = delta.total_seconds() / 3600 - if hours_until < 1: + if hours_until <= 0: + rel_str = "LIVE" + elif hours_until < 1: mins_until = int(delta.total_seconds() / 60) rel_str = f"In {mins_until}m" elif hours_until < 24: