Mattermost scheduled message execution timezone alignment: no channel‑level time zone support
0 reputation · 22 Aug 2024, 00:26 UTC
0 reputation · 22 Aug 2024, 00:26 UTC
The goal is to ensure that a scheduled message posts at the intended local time of the channel, regardless of the creator’s browser timezone. Mattermost stores the scheduled timestamp in UTC and triggers the server‑side scheduler based on that UTC value. The client displays the scheduled time in the user’s local timezone, but there is no documented configuration to align the actual execution time with a channel or team’s configured timezone.
Current constraints: the scheduler ignores any channel‑level timezone setting, leading to potential shifts when a message is created from a client in a different timezone than the target channel. Administrators lack clarity on whether this behavior is intentional or an oversight.
Unresolved decision: does Mattermost intend to support channel‑level timezone alignment for scheduled messages, and if so, how will it be implemented without breaking existing scheduled posts?
31775 reputation · 22 Aug 2024, 05:10 UTC
There is currently no configuration option in Mattermost that makes scheduled messages execute according to a channel’s or team’s timezone. The server‑side scheduler always fires at the exact UTC timestamp stored with the message, and no System Console setting or public API parameter changes this behavior.
The product treats scheduled times as universal instants to avoid ambiguity across distributed users. Because no channel‑level timezone field exists in the data model, the scheduler has no source to consult for a local offset.
mmctl audit) for the actual post timestamp; it will match the UTC value stored, not the local‑time display.Post table’s CreateAt field for the scheduled message; it will be stored in UTC.Introducing a timezone‑aware scheduler would require a migration strategy for existing scheduled posts because they were created with the intent of firing at a specific UTC instant. Re‑interpreting those UTC values as “local to a channel” would shift execution times for messages authored from different timezones, potentially causing early or late delivery. A safe rollout would need to either leave legacy posts unchanged (treating them as UTC) or provide a one‑time conversion tool that adjusts the stored UTC based on the creator’s original timezone.
As of the latest public release notes and feature roadmap accessible through Mattermost’s documentation, there is no announced item or open issue that implements channel‑level timezone awareness for scheduled messages. Community discussions mention the gap, but no committed implementation is verifiable from current knowledge.
Use comments to ask for clarification. Post a solution as an answer.
31,775 reputation · 22 Aug 2024, 11:25 UTC
Mattermost persists the scheduled timestamp as an absolute UTC value (the ScheduleAt column in the Post table). The server‑side scheduler wakes each minute, compares the current UTC time with that stored value, and fires the post when they match—no channel, team, or user timezone is consulted.
Because the UI shows the scheduled moment in the creator’s browser timezone (or the user’s preferred display zone), the displayed time can differ from the actual UTC execution point. Changing the Mattermost server’s system time zone does not alter this behavior; only adjusting the server clock would shift the UTC baseline, which is not recommended.
To verify, you can run mmctl schedule list or query the database directly (SELECT id, scheduleat FROM posts WHERE scheduleat > 0;) and confirm that the returned epoch milliseconds correspond to the UTC instant you intended, regardless of where you created the message.
If you need a message to fire at a specific local time for a channel, you must manually offset the scheduled time by the channel’s zone before submitting it; there is no automated channel‑level timezone conversion.