From 27343ef4e09224bee5fc0ce0a1afe4cea2fdadaf Mon Sep 17 00:00:00 2001
From: Ernesto Rico Schmidt <ernesto@helsinki.at>
Date: Mon, 17 Jun 2024 17:10:12 -0400
Subject: [PATCH] fix: change datetime format

---
 program/services.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/program/services.py b/program/services.py
index eeb6ce3d..9bd164f7 100644
--- a/program/services.py
+++ b/program/services.py
@@ -798,7 +798,7 @@ def make_timeslot_entry(*, timeslot: TimeSlot) -> TimeslotEntry:
     show = timeslot.schedule.show
 
     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,
         "is_virtual": False,
         "playlist_id": timeslot.playlist_id,
@@ -809,7 +809,7 @@ def make_timeslot_entry(*, timeslot: TimeSlot) -> TimeslotEntry:
         "show_default_playlist_id": show.default_playlist_id,
         "show_id": show.id,
         "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
 
     if radio_settings := RadioSettings.objects.first():
         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,
             "show_id": radio_settings.fallback_show.id,
             "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:
         raise NotFound("Radio settings with fallbacks not found.")
-- 
GitLab