Skip to content
Snippets Groups Projects
Verified Commit 27343ef4 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

fix: change datetime format

parent 867dd048
No related branches found
No related tags found
No related merge requests found
...@@ -798,7 +798,7 @@ def make_timeslot_entry(*, timeslot: TimeSlot) -> TimeslotEntry: ...@@ -798,7 +798,7 @@ def make_timeslot_entry(*, timeslot: TimeSlot) -> TimeslotEntry:
show = timeslot.schedule.show show = timeslot.schedule.show
return { return {
"end": timeslot.end.strftime("%Y-%m-%dT%H:%M:%S %z"), "end": timeslot.end.strftime("%Y-%m-%dT%H:%M:%S%z"),
"id": timeslot.id, "id": timeslot.id,
"is_virtual": False, "is_virtual": False,
"playlist_id": timeslot.playlist_id, "playlist_id": timeslot.playlist_id,
...@@ -809,7 +809,7 @@ def make_timeslot_entry(*, timeslot: TimeSlot) -> TimeslotEntry: ...@@ -809,7 +809,7 @@ def make_timeslot_entry(*, timeslot: TimeSlot) -> TimeslotEntry:
"show_default_playlist_id": show.default_playlist_id, "show_default_playlist_id": show.default_playlist_id,
"show_id": show.id, "show_id": show.id,
"show_name": show.name, "show_name": show.name,
"start": timeslot.start.strftime("%Y-%m-%dT%H:%M:%S %z"), "start": timeslot.start.strftime("%Y-%m-%dT%H:%M:%S%z"),
} }
...@@ -818,11 +818,11 @@ def make_virtual_timeslot_entry(*, gap_start: datetime, gap_end: datetime) -> Vi ...@@ -818,11 +818,11 @@ def make_virtual_timeslot_entry(*, gap_start: datetime, gap_end: datetime) -> Vi
if radio_settings := RadioSettings.objects.first(): if radio_settings := RadioSettings.objects.first():
return { return {
"end": gap_end.strftime("%Y-%m-%dT%H:%M:%S %z"), "end": gap_end.strftime("%Y-%m-%dT%H:%M:%S%z"),
"is_virtual": True, "is_virtual": True,
"show_id": radio_settings.fallback_show.id, "show_id": radio_settings.fallback_show.id,
"show_name": radio_settings.fallback_default_pool, "show_name": radio_settings.fallback_default_pool,
"start": gap_start.strftime("%Y-%m-%dT%H:%M:%S %z"), "start": gap_start.strftime("%Y-%m-%dT%H:%M:%S%z"),
} }
else: else:
raise NotFound("Radio settings with fallbacks not found.") raise NotFound("Radio settings with fallbacks not found.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment