Merge pull request #1303 from jooola/fix/api_client_v2_get_schedule

Fix api client v2 get schedule
This commit is contained in:
Kyle Robbertze 2021-08-18 17:12:48 +02:00 committed by GitHub
commit 0c76ed72fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,9 @@
# probably want to create a script on your server side to automatically # probably want to create a script on your server side to automatically
# schedule a playlist one minute from the current time. # schedule a playlist one minute from the current time.
############################################################################### ###############################################################################
import datetime
import logging import logging
import sys import sys
from datetime import datetime, timedelta
from configobj import ConfigObj from configobj import ConfigObj
from dateutil.parser import isoparse from dateutil.parser import isoparse
@ -46,8 +46,8 @@ class AirtimeApiClient:
sys.exit(1) sys.exit(1)
def get_schedule(self): def get_schedule(self):
current_time = datetime.datetime.utcnow() current_time = datetime.utcnow()
end_time = current_time + datetime.timedelta(hours=1) end_time = current_time + timedelta(days=1)
str_current = current_time.isoformat(timespec="seconds") str_current = current_time.isoformat(timespec="seconds")
str_end = end_time.isoformat(timespec="seconds") str_end = end_time.isoformat(timespec="seconds")