Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e85ced6ce | |||
| 5d65533ff5 | |||
| 085514ab16 | |||
| 960ff6e5ac | |||
| 04e29469dd | |||
| 360188114e |
@@ -6,8 +6,8 @@ SCOREBOARD_DATA_FILE = 'app/data/scoreboard_data.json'
|
|||||||
|
|
||||||
def get_scoreboard_data():
|
def get_scoreboard_data():
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
start_time_evening = now.replace(hour=23, minute=00, second=0, microsecond=0) # 7:00 PM EST
|
start_time_evening = now.replace(hour=19, minute=00, second=0, microsecond=0) # 7:00 PM EST
|
||||||
end_time_evening = now.replace(hour=8, minute=00, second=0, microsecond=0) # 3:00 AM EST
|
end_time_evening = now.replace(hour=2, minute=00, second=0, microsecond=0) # 3:00 AM EST
|
||||||
|
|
||||||
if now >= start_time_evening or now < end_time_evening:
|
if now >= start_time_evening or now < end_time_evening:
|
||||||
# Use now URL
|
# Use now URL
|
||||||
|
|||||||
@@ -58,7 +58,11 @@ def process_time_remaining(game):
|
|||||||
def process_start_time(game):
|
def process_start_time(game):
|
||||||
if game["gameState"] in ["PRE", "FUT"]:
|
if game["gameState"] in ["PRE", "FUT"]:
|
||||||
utc_time = game["startTimeUTC"]
|
utc_time = game["startTimeUTC"]
|
||||||
return utc_to_est_time(utc_time)
|
est_time = utc_to_est_time(utc_time)
|
||||||
|
# Check if the hour starts with a zero
|
||||||
|
if est_time.startswith("0"):
|
||||||
|
est_time = est_time[1:] # Drop the leading zero
|
||||||
|
return est_time
|
||||||
else:
|
else:
|
||||||
return "N/A"
|
return "N/A"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user