Я пытался заставить его начать сбор данных, когда он достигает 9:15 по моему времени, но каждый раз, когда я пытаюсь это сделать, он мне не позволяет, это код, который я использую
from datetime import datetime, time
import time as t
# Function to check if the market is open (based on NSE timings)
def is_market_open():
now = datetime.now() # Get the current time
market_open_time = time(9, 15) # Market opens at 9:15 AM
market_close_time = time(15, 30) # Market closes at 3:30 PM
# Check if current time is within market hours
return market_open_time
Подробнее здесь: https://stackoverflow.com/questions/790 ... ep-getting