Merge pull request #1303 from jooola/fix/api_client_v2_get_schedule
Fix api client v2 get schedule
This commit is contained in:
commit
0c76ed72fb
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue