Explode datetime import statement
This commit is contained in:
parent
efd362eb62
commit
577e581959
1 changed files with 3 additions and 3 deletions
|
@ -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")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue