[bug] AURA does not apply summer-winter time shift correctly
Summary
Testing the dashboard.aura.radio, several users remarked that the timeslots that are shown in the AURA calendar do not match with the dates and the recurrence scheme info that is printed in the dashboard area "shows & schedules". It seems AURA does not apply the timeshift between summer and winter time, so the whole schedules appear with an hour of offset.
an example to reproduce:
1- show "Klassik am Sonntag" has a calendar timeslot that appears in the week calendar on Sundays 9-10 am. 2- in the "shows and schedules" area there are two diverging infos printed: "wöchentlich am Dienstag" and "8-9am", while the list of dates shows the timeslots as "Sonntag 9-10h".
Expected Result
AURA should follow the summer-winter timeshift and schedules should be kept at the same time. This means at the moments of the timeshift, an hour has to be added / taken away to keep the schedules matching with the current time.
Actual Result
see screenshots:
Environment
Firefox 122 / Ubuntu on dashboard.aura.radio
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Margarethe Maierhofer-Lischka changed milestone to %1.0-alpha5 — Capable Capybara
changed milestone to %1.0-alpha5 — Capable Capybara
- Margarethe Maierhofer-Lischka added P2 bug labels
- Margarethe Maierhofer-Lischka assigned to @eigenwijsje
assigned to @eigenwijsje
- Margarethe Maierhofer-Lischka mentioned in issue aura#342 (closed)
mentioned in issue aura#342 (closed)
- Margarethe Maierhofer-Lischka marked this issue as related to aura#342 (closed)
marked this issue as related to aura#342 (closed)
- Author Reporter
I added aura#342 (closed) as linked issue because it seems like both errors are related.
- Ernesto Rico Schmidt added size:l label
added size:l label
- Ernesto Rico Schmidt removed size:l label
removed size:l label
- Ernesto Rico Schmidt added size:m label
added size:m label
- Ernesto Rico Schmidt added time estimate of 30h
added time estimate of 30h
- Ernesto Rico Schmidt changed time estimate to 12h from 30h
changed time estimate to 12h from 30h
- David Trattnig added To Do label
added To Do label
- David Trattnig added Cycle [3/24] label
added Cycle [3/24] label
- Ernesto Rico Schmidt added Doing label and removed To Do label
- Ernesto Rico Schmidt added To Do label and removed Doing label
- Owner
Collapse replies - Author Reporter
ok, so the issue appears to be: find a way that AURA correctly renders the summer-winter time-shift.
- Author Reporter
I edited the ticket description accordingly, to match the precise issue
- David Trattnig added Cycle [4/24] label
added Cycle [4/24] label
- Margarethe Maierhofer-Lischka changed title from bug: timeslots in calendar do not match with recurrence info in dashboard / error when generating new programme to [bug] AURA does not apply summer-winter time shift correctly
changed title from bug: timeslots in calendar do not match with recurrence info in dashboard / error when generating new programme to [bug] AURA does not apply summer-winter time shift correctly
- Margarethe Maierhofer-Lischka changed the description
changed the description
- Owner
I guess there is something wrong in the dashboard.
The schedule for the show 682 ("Klassik am Sonntag") is from 8am to 9am on Sundays.
$ curl -s https://dashboard.aura.radio/steering/api/v1/schedules/?show_ids=682 | jq .
[ { "addBusinessDaysOnly": false, "addDaysNo": null, "byWeekday": 6, "defaultPlaylistId": null, "endTime": "09:00:00", "firstDate": "2018-02-25", "id": 10175, "isRepetition": false, "lastDate": null, "rruleId": 3, "showId": 682, "startTime": "08:00:00" } ]
And the corresponding timeslots between March and October look ok to me.
$ curl -s https://dashboard.aura.radio/steering/api/v1/timeslots/?schedule_ids=10175 | jq --arg first '2024-03-01' --arg last '2024-10-31' '.[] | select (.start | . > $first and . < $last)'
{ "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-10-27T09:00:00+01:00", "id": 4502, "noteId": 6101, "scheduleId": 10175, "showId": 682, "start": "2024-10-27T08:00:00+01:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-10-20T10:00:00+02:00", "id": 4501, "noteId": 5959, "scheduleId": 10175, "showId": 682, "start": "2024-10-20T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-10-13T10:00:00+02:00", "id": 4500, "noteId": 5810, "scheduleId": 10175, "showId": 682, "start": "2024-10-13T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-10-06T10:00:00+02:00", "id": 4499, "noteId": 5668, "scheduleId": 10175, "showId": 682, "start": "2024-10-06T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-09-29T10:00:00+02:00", "id": 4498, "noteId": 5521, "scheduleId": 10175, "showId": 682, "start": "2024-09-29T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-09-22T10:00:00+02:00", "id": 4497, "noteId": 5379, "scheduleId": 10175, "showId": 682, "start": "2024-09-22T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-09-15T10:00:00+02:00", "id": 4496, "noteId": 5230, "scheduleId": 10175, "showId": 682, "start": "2024-09-15T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-09-08T10:00:00+02:00", "id": 4495, "noteId": 5088, "scheduleId": 10175, "showId": 682, "start": "2024-09-08T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-09-01T10:00:00+02:00", "id": 4494, "noteId": 4941, "scheduleId": 10175, "showId": 682, "start": "2024-09-01T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-08-25T10:00:00+02:00", "id": 4493, "noteId": 4798, "scheduleId": 10175, "showId": 682, "start": "2024-08-25T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-08-18T10:00:00+02:00", "id": 4492, "noteId": 4648, "scheduleId": 10175, "showId": 682, "start": "2024-08-18T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-08-11T10:00:00+02:00", "id": 4491, "noteId": 4506, "scheduleId": 10175, "showId": 682, "start": "2024-08-11T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-08-04T10:00:00+02:00", "id": 4490, "noteId": 4358, "scheduleId": 10175, "showId": 682, "start": "2024-08-04T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-07-28T10:00:00+02:00", "id": 4489, "noteId": 4215, "scheduleId": 10175, "showId": 682, "start": "2024-07-28T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-07-21T10:00:00+02:00", "id": 4488, "noteId": 4065, "scheduleId": 10175, "showId": 682, "start": "2024-07-21T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-07-14T10:00:00+02:00", "id": 4487, "noteId": 3923, "scheduleId": 10175, "showId": 682, "start": "2024-07-14T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-07-07T10:00:00+02:00", "id": 4486, "noteId": 3775, "scheduleId": 10175, "showId": 682, "start": "2024-07-07T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-06-30T10:00:00+02:00", "id": 4485, "noteId": 3632, "scheduleId": 10175, "showId": 682, "start": "2024-06-30T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-06-23T10:00:00+02:00", "id": 4484, "noteId": 3482, "scheduleId": 10175, "showId": 682, "start": "2024-06-23T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-06-16T10:00:00+02:00", "id": 4483, "noteId": 3340, "scheduleId": 10175, "showId": 682, "start": "2024-06-16T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-06-09T10:00:00+02:00", "id": 4482, "noteId": 3192, "scheduleId": 10175, "showId": 682, "start": "2024-06-09T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-06-02T10:00:00+02:00", "id": 4481, "noteId": 3049, "scheduleId": 10175, "showId": 682, "start": "2024-06-02T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-05-26T10:00:00+02:00", "id": 4480, "noteId": 2899, "scheduleId": 10175, "showId": 682, "start": "2024-05-26T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-05-19T10:00:00+02:00", "id": 4479, "noteId": 2757, "scheduleId": 10175, "showId": 682, "start": "2024-05-19T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-05-12T10:00:00+02:00", "id": 4478, "noteId": 2609, "scheduleId": 10175, "showId": 682, "start": "2024-05-12T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-05-05T10:00:00+02:00", "id": 4477, "noteId": 2466, "scheduleId": 10175, "showId": 682, "start": "2024-05-05T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-04-28T10:00:00+02:00", "id": 4476, "noteId": 2316, "scheduleId": 10175, "showId": 682, "start": "2024-04-28T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-04-21T10:00:00+02:00", "id": 4475, "noteId": 2174, "scheduleId": 10175, "showId": 682, "start": "2024-04-21T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-04-14T10:00:00+02:00", "id": 4474, "noteId": 2026, "scheduleId": 10175, "showId": 682, "start": "2024-04-14T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-04-07T10:00:00+02:00", "id": 4473, "noteId": 1883, "scheduleId": 10175, "showId": 682, "start": "2024-04-07T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-03-31T10:00:00+02:00", "id": 4472, "noteId": 1733, "scheduleId": 10175, "showId": 682, "start": "2024-03-31T09:00:00+02:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-03-24T09:00:00+01:00", "id": 4471, "noteId": 1591, "scheduleId": 10175, "showId": 682, "start": "2024-03-24T08:00:00+01:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-03-17T09:00:00+01:00", "id": 4470, "noteId": 1443, "scheduleId": 10175, "showId": 682, "start": "2024-03-17T08:00:00+01:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-03-10T09:00:00+01:00", "id": 4469, "noteId": 1303, "scheduleId": 10175, "showId": 682, "start": "2024-03-10T08:00:00+01:00" } { "memo": "", "playlistId": null, "repetitionOfId": null, "end": "2024-03-03T09:00:00+01:00", "id": 4468, "noteId": 1156, "scheduleId": 10175, "showId": 682, "start": "2024-03-03T08:00:00+01:00" }
Note that the offset of
start
andend
correctly switch at the end of March and the end of October.@kmohrf Is it OK if I move this to the dashboard?
Edited by Ernesto Rico Schmidt Collapse replies - Owner
It’s late and my brain might be too exhausted to properly think about this, but timeslot
4472
has a start time of2024-03-31T09:00:00+02:00
. I think the point of the timezone offset is, that the time itself doesn’t need to change so this should actually be2024-03-31T08:00:00+02:00
, shouldn’t it? - Owner
>>> import datetime >>> import zoneinfo >>> now = datetime.datetime.now(tz=zoneinfo.ZoneInfo('Europe/Berlin')) >>> now.isoformat() '2024-07-24T01:21:23.508427+02:00' >>> (now + datetime.timedelta(days=180)).isoformat() '2025-01-20T01:21:23.508427+01:00'
01:21 was my local time when I executed this.
…my point being: The local time shouldn’t change in the datetime string, but only the offset.
Edited by Konrad Mohrfeldt - Owner
After some thought. I have the feeling that
steering
is exposing datetime objects the wrong way.Internally we’re using Django’s timezone-aware datetime objects. This is the way these objects are stored in the database and I think this is the right way to do.
If we just switch to exposing the
start
andend
in timeslots as timezone-naive objects, we should be fine and there is no longer a switching in the timezone.Or, am I missing something?
Edited by Ernesto Rico Schmidt - Owner
If I switch my local timezone to Viena (to have a daylight saving time switch) and create a new schedule, this is how it looks:
I noticed two things:
- The timeslots are shown at 11, but the schedule is for 17 as it’s show at the bottom.
- The timeslots switch to 12 when DST ends.
But, if I expose the
start
andend
of the timeslots as timezone-naive objects, they look fine:This seems to break the calendar view, maybe because it expects the
start
andend
to have a timezone.