A scheduled sync runs in the instance's language and time zone, not its owner's #335
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#335
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-30, reading
src/postulo/plugins/syncing.pyat0a5cad587and following what postulo-dav writes during a run.sync_connectionruns a sync plugin with nothing activated. A sync started by the scheduler therefore runs insettings.LANGUAGE_CODEandsettings.TIME_ZONE, while the same sync started by Sync now runs inside the person's request, in their language and zone. What the run writes depends on who started it.plugins/syncing.py:70-96(sync_connection):plugin.sync(connection, connection.full_config)with no language and no time zone set forconnection.owner.run_syncs(:110-137) calls it from the scheduler pass (src/postulo/notifications/management/commands/send_due_reminders.py:198).plugins/views.py:453-456: Sync now calls the same function inside a request, where the middleware has activated the person's zone (src/postulo/core/middleware.py:129) and language.src/postulo/notifications/service.py:18-50wraps the sending intranslation.override(language_for(user)), because "a reminder announced by the scheduler has no request at all" (#223).reschedule_interviewwords the "moved from … to …" timeline entry and the reminder's summary withtimezone.localtimeand the active formats (src/postulo/applications/services.py:354-372). With nothing active that is the server's zone, so a person in another zone gets a reminder naming the wrong hour, sent word for word as the notification's title.event_lines'SUMMARYand its "With:" line, pushed to the person's calendar) comes out in the instance's language, not the owner's.Connection.last_summaryis worded in whichever language the run happened in, and shown later inside a sentence in the reader's.sync_connectionruns the plugin as its owner: insidetranslation.override(language_for(connection.owner))and the owner's time zone, restored afterwards, whoever started the run. One helper for "as this person", shared with the notification service, so the next piece of work done outside a request has it to use.Related: #223 (closed), which did this for documents and notifications.
Done when
Found while filing the extension and DAV plugin improvements of 2026-09-30.