Add a separate end time zone for events (#311)#1231
Open
josephkimani wants to merge 7 commits into
Open
Conversation
Empty end_time_zone means 'same as start zone', so existing events are unchanged. getEndTimeZoneString() falls back to the start zone. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces the single time-zone row with a zone label under each of the start and end time (tappable -> SelectTimeZoneActivity), and a local-time readout shown when a zone differs from the device zone. Gated behind allowChangingTimeZones; all-day events unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The CalDAV import loop reads Events.EVENT_END_TIMEZONE, but the column was missing from the cursor projection. Fossify Commons' getStringValue uses getColumnIndexOrThrow, so the read threw on the first event row; queryCursorInlined silently swallowed it, leaving fetchedEventIds empty. The subsequent cleanup pass then deleted every locally-cached CalDAV event because none were in the (empty) fetched set, making CalDAV events vanish from the app. Deletion ran with deleteFromCalDAV=false, so server data was unaffected and a fixed re-sync restores the events. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds an optional separate end time zone for events, so an event can start in one zone and end in another — e.g. a flight that departs New York and lands in London shows the correct local time at each end. Implements the long-standing request in #311 (and #1113).
When no distinct end zone is set, behaviour is unchanged: an empty end zone means "same as the start zone", so existing events and the common single-zone case are completely unaffected.
How
Event): newend_time_zonecolumn (Room v11 → v12, additive migration withDEFAULT '').getEndTimeZoneString()falls back to the start zone when the end zone is unset or unknown.computeStartEndSeconds): interprets the start and end wall-clock times each in its own zone, tolerating DST spring-forward gaps.EventActivity): reveals a second time-zone row plus a device-local-time readout, all gated behind the existing "Allow changing event time zones" setting. All-day and recurring events keep a single zone.EVENT_END_TIMEZONEcolumn — no extra storage.TZIDfor bothDTSTARTandDTEND.New unit tests cover the time math (incl. a DST-gap case), the end-zone fallback/alias handling, and
TZIDparsing.Scope / follow-up
In-app, on-device, and CalDAV (intra-device) all carry the end zone today. ICS export (
TZID+VTIMEZONE) and full cross-client/server propagation are intentionally deferred to a follow-up PR — correctVTIMEZONEgeneration is a sizeable change that deserves its own review.Testing
detektand all debug flavors build clean.🤖 Generated with Claude Code