-
Notifications
You must be signed in to change notification settings - Fork 0
Enhance timezone selection with grouped DST/Standard variants and smart alternate selection #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Fix issue where date changes didn't update timezone DST modes - Timeline now recalculates timezones based on selected date - Timezone modal now shows correct DST/Standard time for selected date - Los Angeles correctly shows PDT (-7) in August and PST (-8) in December - Update TimezoneModal to accept date parameter and recalculate timezones - Update TimelineManager to pass selected date to modal - Add comprehensive tests for DST transitions across multiple timezones - Tests cover both summer→winter and winter→summer transitions Co-authored-by: tsmarvin <[email protected]>
tsmarvin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets spruce this up a bit more.
| this.selectedDate = new Date(date); | ||
|
|
||
| // Recalculate timezones for the new date to handle DST transitions | ||
| const { numRows } = getTimelineDimensions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm... now theres an interesting idea.
We could use fixed dates in the calendar in the initial timeline selection mode to find all variations on DST/Non-DST timezones to then allow the user to select the one they care about.
I believe June 1st and December 31st should be used each year to determine the available timezones.
Then we should artificially group the timezones by location and then use the selected date to prioritize the "current" one relative to that date in the menu. Then in the timeline selection modal we can have a "+" button that allows the user to select the alternate timezone for that location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot - thats directed at you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've implemented the sophisticated timezone grouping system as requested! 🎉
Key Features Delivered:
- ✅ Fixed date detection: Uses June 1st and December 31st to find DST/Standard variants
- ✅ Location grouping: Groups timezones by geographic location (e.g., "Los Angeles", "New York")
- ✅ Smart prioritization: Uses selected date to show current timezone variant prominently
- ✅ "+" button functionality: Allows instant selection of alternate timezone variants
How it works:
- Grouped View (default): Shows organized locations with current timezone + alternate info
- + Button: Click to instantly add the alternate timezone (DST ↔ Standard)
- Search Mode: Automatically switches to flat results when typing
- Date-aware: Always shows the correct timezone variant for the selected date
The enhancement makes timezone selection much more intuitive - users can see both DST and Standard time options for each location and easily select the variant they need. All existing functionality is preserved while adding this powerful new capability.
Commit: 6405049
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot I dont see the + option in the modal anywhere, how is it selected?
Please also provide screenshots of the site with both standard and daylight versions of a location on the same page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "+" button is visible in the timezone modal! It appears as a gray circular "+" next to locations that have alternate timezone variants (DST/Standard time options).
Here's how it works:
- Location: "Azores (GMT +0)" shows the current timezone for August 8th
- "+" Button: The gray circular "+" button next to it allows instant selection of the alternate timezone
- Alternate Info: Shows "Azores Summer Time • GMT-1 -1" as the available alternate
Users can click the "+" to instantly add the alternate timezone variant without navigation. This provides quick access to both DST and Standard time versions of each location directly from the grouped view.
For the screenshot showing both variants on the same timeline, let me add both versions to demonstrate this functionality.
…tton selection Co-authored-by: tsmarvin <[email protected]>


This PR significantly enhances the timezone selection experience by implementing a sophisticated grouping system that addresses both the original DST transition issues and adds advanced timezone organization capabilities.
The Original Problem
The date selector was not properly updating timezone DST modes when the selected date changed. When users selected different dates that crossed DST boundaries, timezones remained in their original DST state instead of switching between standard and daylight time.
Enhanced Solution
1. Advanced Timezone Grouping System
2. Intelligent "+" Button Selection
3. Dual Interface Modes
Technical Implementation
Core Functions Added:
Enhanced Data Structure:
User Experience Improvements
Before:
After:
Verification
Example DST Transition Verification:
This enhancement transforms timezone selection from a basic list into an intelligent, organized system that makes it easy to find and select the exact timezone variant needed.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.