Explode datetime import statement

This commit is contained in:
jo 2021-08-18 16:23:05 +02:00
parent efd362eb62
commit 577e581959

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(days=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")