Skip to content

Add per-conversation timezone support for reminders - #38

Open
vinayak-wire wants to merge 6 commits into
mainfrom
feature/conversation-timezone
Open

Add per-conversation timezone support for reminders#38
vinayak-wire wants to merge 6 commits into
mainfrom
feature/conversation-timezone

Conversation

@vinayak-wire

Copy link
Copy Markdown

PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Briefly describe the issue you have solved or implemented with this pull request. If the PR contains multiple issues, use a bullet list.

Causes (Optional)

Briefly describe the causes behind the issues. This could be helpful to understand the adopted solutions behind some nasty bugs or complex issues.

Solutions

Briefly describe the solutions you have implemented for the issues explained above.

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

What's new in this PR?

Adds per-conversation timezone support for /remind reminders (previously
hardcoded to the server's system timezone).

New commands:

  • /remind set timezone <zone> — sets the conversation's timezone (case-insensitive)
  • /remind show timezone — shows the currently configured timezone
  • Defaults to CET if never set

Supported zones (18): UTC, GMT, CET, MET, WET, EET, EST, CST, MST, PST, BST,
IST, JST, AEST, SGT, HKT, HST, NZST — each mapped to a verified IANA zone ID
(not the raw abbreviation) so DST is handled correctly.

Also removed the typed /remind delete <reminderId> command — deletion is
now button-only, since every listed reminder already has a Delete button
and the typed form was redundant.

Issues

Reminders always fired and displayed in the server's own system timezone,
regardless of what timezone the actual users creating them were in.

Causes (Optional)

ZoneId.systemDefault() was used directly in cron scheduling, jchronic
parsing, and message formatting, with no per-conversation concept of
timezone anywhere in the data model.

Solutions

  • New CONVERSATION_SETTINGS table + repository storing one timezone per conversation
  • zoneId added to the Reminder domain model and persisted with each reminder
  • Quartz cron triggers now carry .inTimeZone(...)
  • jchronic parsing seeded with a Calendar in the target zone
  • Help text and confirmation messages updated to reflect the chosen zone

Known gaps (flagged, not fixed)

  • No new unit tests specific to the timezone logic itself (existing tests
    updated to keep passing, no new coverage added)
  • CONVERSATION_SETTINGS rows aren't cleaned up on conversation deletion
    (matches existing behavior for REMINDERS)
  • DST-transition edge cases (e.g. "every day at 02:30" on the clock-change
    day) untested against Quartz's actual behavior
  • Not run through ktlint/detekt yet — likely minor style violations to fix

Note: this branch shows a merge conflict against main — will need
resolving before merge.

@vinayak-wire
vinayak-wire requested a review from a team as a code owner September 4, 2026 07:48
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants