Add per-conversation timezone support for reminders - #38
Open
vinayak-wire wants to merge 6 commits into
Open
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
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
/remindreminders (previouslyhardcoded 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 timezoneCETif never setSupported 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 isnow 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, jchronicparsing, and message formatting, with no per-conversation concept of
timezone anywhere in the data model.
Solutions
CONVERSATION_SETTINGStable + repository storing one timezone per conversationzoneIdadded to theReminderdomain model and persisted with each reminder.inTimeZone(...)Calendarin the target zoneKnown gaps (flagged, not fixed)
updated to keep passing, no new coverage added)
CONVERSATION_SETTINGSrows aren't cleaned up on conversation deletion(matches existing behavior for
REMINDERS)day) untested against Quartz's actual behavior
Note: this branch shows a merge conflict against
main— will needresolving before merge.