Repository navigation
Dashboard: the chain builder schedules in the scheduler time zone - #304
Merged
Merged
Conversation
The chain builder read the typed date and time in the browser time zone and sent it as UTC, without timeZoneId. The Add dialog sends the same time without a zone and with timeZoneId, so the server reads it in the scheduler zone. With a browser in another zone than the scheduler, a chain typed for 23:00 ran at another hour (from New York for an Istanbul scheduler: 07:00 the next day). The chain builder now sends the wall-clock time and the scheduler zone, as the Add dialog does; the server already reads a whole chain in that zone. The conversion is in utilities/schedulerTime.ts, with tests.
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.
The chain builder read the typed date and time in the browser's time zone and sent it as UTC, without
timeZoneId. The Add dialog sends the same time without a zone and withtimeZoneId(the scheduler's zone), and the server reads the whole chain in that zone. With a browser in another zone than the scheduler, a chain typed for 23:00 ran at another hour: from a browser in New York, for a scheduler in Istanbul, 23:00 on 1 December was stored as 07:00 on 2 December (scheduler time), and the table showed it so.Change
timeZoneId= the scheduler's zone, as the Add dialog does. The server already reads every node of a chain in that zone (ReadChainTimesInTimeZone).utilities/schedulerTime.ts(toWallClockText, aDateonly), with tests.What does not change
Testing
schedulerTime.test.ts, also run withTZ=America/New_YorkandTZ=Asia/Tokyo. A mutant that converts with the browser's zone again (setHours+toISOString) fails the full dashboard suite underTZ=America/New_York.America/New_York(sample app, schedulerEurope/Istanbul), a chain typed for 1 December 2026 23:00:00: before, stored2026-12-02T04:00:00Z; after,2026-12-01T20:00:00Z(23:00 in Istanbul).vue-tsc --buildclean, no new lint messages, every .NET test project passes, the scenario solution builds.