ICS instance feed: time_zone_not_found #35

Open
opened 2023-12-10 23:38:00 +01:00 by 778a69cd · 1 comment
Owner

Another issue with ICS instance feeds:

$ curl https://oberlausitz.vonunten.org/feed/instance/ics
Bad feed
Dec 10 23:34:57 oberlausitz mobilizon[347]: 23:34:57.268 request_id=F5-ZQvlF0Ky2EXcAAGsB [warning] Unable to find feed data cached for key instance, returned {:error, %Cachex.ExecutionError{message: "cannot shift ~U[2023-10-20 13:00:00Z] to \"Other/UTC\" time zone, reason: :time_zone_not_found", stack: [{DateTime, :shift_zone!, 3, [file: ~c"lib/calendar/datetime.ex", line: 778]}, {Mobilizon.Service.Export.ICalendar, :do_export_event, 1, [file: ~c"lib/service/export/icalendar.ex", line: 124]}, {Enum, :"-map/2-lists^map/1-1-", 2, [file: ~c"lib/enum.ex", line: 1693]}, {Enum, :"-map/2-lists^map/1-1-", 2, [file: ~c"lib/enum.ex", line: 1693]}, {Mobilizon.Service.Export.ICalendar, :fetch_instance_feed, 0, [file: ~c"lib/service/export/icalendar.ex", line: 66]}, {Mobilizon.Service.Export.ICalendar, :create_cache, 1, [file: ~c"lib/service/export/icalendar.ex", line: 59]}, {Cachex.Services.Courier, :"-handle_call/3-fun-0-", 5, [file: ~c"lib/cachex/services/courier.ex", line: 77]}, {Cachex.Services.Courier, :dispatch, 3, [file: ~c"lib/cachex/services/courier.ex", line: 44]}, {Cachex, :fetch, 4, [file: ~c"lib/cachex.ex", line: 693]}, {Mobilizon.Web.FeedController, :return_data, 4, [file: ~c"lib/web/controllers/feed_controller.ex", line: 74]}, {Mobilizon.Web.FeedController, :action, 2, [file: ~c"lib/web/controllers/feed_controller.ex", line: 1]}, {Mobilizon.Web.FeedController, :phoenix_controller_pipeline, 2, [file: ~c"lib/web/controllers/feed_controller.ex", line: 1]}, {Phoenix.Router, :__call__, 5, [file: ~c"lib/phoenix/router.ex", line: 432]}]}}
Another issue with ICS instance feeds: ``` $ curl https://oberlausitz.vonunten.org/feed/instance/ics Bad feed ``` ``` Dec 10 23:34:57 oberlausitz mobilizon[347]: 23:34:57.268 request_id=F5-ZQvlF0Ky2EXcAAGsB [warning] Unable to find feed data cached for key instance, returned {:error, %Cachex.ExecutionError{message: "cannot shift ~U[2023-10-20 13:00:00Z] to \"Other/UTC\" time zone, reason: :time_zone_not_found", stack: [{DateTime, :shift_zone!, 3, [file: ~c"lib/calendar/datetime.ex", line: 778]}, {Mobilizon.Service.Export.ICalendar, :do_export_event, 1, [file: ~c"lib/service/export/icalendar.ex", line: 124]}, {Enum, :"-map/2-lists^map/1-1-", 2, [file: ~c"lib/enum.ex", line: 1693]}, {Enum, :"-map/2-lists^map/1-1-", 2, [file: ~c"lib/enum.ex", line: 1693]}, {Mobilizon.Service.Export.ICalendar, :fetch_instance_feed, 0, [file: ~c"lib/service/export/icalendar.ex", line: 66]}, {Mobilizon.Service.Export.ICalendar, :create_cache, 1, [file: ~c"lib/service/export/icalendar.ex", line: 59]}, {Cachex.Services.Courier, :"-handle_call/3-fun-0-", 5, [file: ~c"lib/cachex/services/courier.ex", line: 77]}, {Cachex.Services.Courier, :dispatch, 3, [file: ~c"lib/cachex/services/courier.ex", line: 44]}, {Cachex, :fetch, 4, [file: ~c"lib/cachex.ex", line: 693]}, {Mobilizon.Web.FeedController, :return_data, 4, [file: ~c"lib/web/controllers/feed_controller.ex", line: 74]}, {Mobilizon.Web.FeedController, :action, 2, [file: ~c"lib/web/controllers/feed_controller.ex", line: 1]}, {Mobilizon.Web.FeedController, :phoenix_controller_pipeline, 2, [file: ~c"lib/web/controllers/feed_controller.ex", line: 1]}, {Phoenix.Router, :__call__, 5, [file: ~c"lib/phoenix/router.ex", line: 432]}]}} ```
778a69cd added the
upstream
label 2023-12-10 23:38:44 +01:00
Author
Owner

The problem seems to be that one user set Other/UTC as their timezone string. That timezone isn't listed in our timezone database tzdata.

I see multiple ways to approach this:

  • Figure out wether Other/UTC is standardised and then add it to tzdata.
  • Make Mobilizon handle this gracefully and skip events with an unknown timezone.
  • Make Mobilizon assume UTC on an unknown timezone.
The problem seems to be that one user set `Other/UTC` as their timezone string. That timezone isn't listed in our timezone database [tzdata](https://github.com/lau/tzdata). I see multiple ways to approach this: - Figure out wether `Other/UTC` is standardised and then add it to tzdata. - Make Mobilizon handle this gracefully and skip events with an unknown timezone. - Make Mobilizon assume `UTC` on an unknown timezone.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: potsda.mn/mobilizon#35
No description provided.