MWPW-196529: display start datetime in user local timezone with epoch input#635
Open
michaelready wants to merge 2 commits into
Open
MWPW-196529: display start datetime in user local timezone with epoch input#635michaelready wants to merge 2 commits into
michaelready wants to merge 2 commits into
Conversation
… input - datetime-local input now shows time in the user's detected timezone (falls back to UTC) - label updated to indicate the active timezone - added bidirectional epoch (ms) input field - DST-safe local→UTC conversion via Intl API - removed PT/local preview string display Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PT hint now displays as MM/DD/YYYY, HH:MM AM/PM - fix epoch input dropping below datetime input when PT hint is visible Co-Authored-By: Claude Sonnet 4.6 <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.
JIRA
MWPW-196529
Summary
Converts the schedule-maker block editor's start datetime input to display in the user's local timezone instead of UTC, and adds a bidirectional epoch (ms) input field.
BlockEditor.js): Datetime-local input now shows time in the user's detected browser timezone viaIntl.DateTimeFormat. Label updated from"Start Date and Time UTC"to"Start Date and Time (America/Los_Angeles)"(or whatever the detected timezone is). Falls back toUTCif timezone cannot be detected, which is clearly indicated in the labelBlockEditor.js):localInputToEpoch()probes the actual UTC offset for the entered datetime viaIntlbefore converting to epoch ms — handles US daylight saving time transitions correctly. Storage format is unchanged; DB always receives epoch millisecondsBlockEditor.js): New number input field showing the raw epoch millisecond value. Bidirectionally synced — editing either the datetime picker or the epoch field updates the other. Accepts all existing timestamp formats from the sheet importer (2025-06-16T09:00:00Z,2025-06-16T09:00:00-07:00,1750064400000)BlockEditor.js,schedule-maker.css): When the user's timezone is not PT, a small secondary line appears below the datetime picker showing the equivalent PT time inMM/DD/YYYY, HH:MM AM/PMformatBlockEditor.js,schedule-maker.css): Removed the old PT and local time string preview block and its associated CSS rules (.sm-editor__block-datetime-preview,.sm-editor__block-datetime-preview-label,.sm-editor__block-datetime-preview-item)Test Plan
startDateTime— datetime input should show the correct local time, epoch field should show the ms value"Start Date and Time (UTC)"and PT hint should appear below the datetime pickerAmerica/Los_Angeles— PT hint should not appear2025-06-16T09:00:00Z,2025-06-16T09:00:00-07:00) and epoch ms values — all should display correctly after importMade with Claude Code