Repository navigation
fix(scheduler): show short server timezone on fixed-time labels #23111
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
Merged
juliusmarminge
merged 19 commits into
pingdotgg:main
from
shawk08033:fix/scheduler-timezone-short-label
Nov 11, 2026
+128
−38
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c01a227
fix(scheduler): show short server timezone on fixed-time labels
5342313
Merge remote-tracking branch 'github/main' into takeover-23111
maria-rcks 9a4faa2
fix(scheduler): keep timezone fallback labels compact
maria-rcks 5a9c92b
chore: merge main
maria-rcks 73a54e5
Merge remote-tracking branch 'github/main' into takeover-23111
maria-rcks 7b7ea39
fix(scheduler): label runs with their timezone at execution
maria-rcks f52a6e2
test(scheduler): expect generic zones for paused tasks
maria-rcks 415fa8a
chore: merge main into scheduler timezone fix
maria-rcks 9954233
test(scheduler): provide managed policy in timezone case
maria-rcks a9027f9
Merge remote-tracking branch 'github/main' into fix/scheduler-timezon…
maria-rcks bcf6f56
Merge remote-tracking branch 'github/main' into fix/scheduler-timezon…
maria-rcks 31c0c67
fix(web): describe the fixed-time input with its server zone
maria-rcks d0ee521
Merge remote-tracking branch 'origin/main' into fix/scheduler-timezon…
juliusmarminge ed82e31
refactor(scheduler): share the zone label helper and trim tests
juliusmarminge b3418a0
Merge remote-tracking branch 'origin/main' into fix/scheduler-timezon…
juliusmarminge 9d92c50
Merge remote-tracking branch 'origin/main' into fix/scheduler-timezon…
shawk08033 4a4cef5
Merge remote-tracking branch 'origin/main' into fix/scheduler-timezon…
juliusmarminge f899529
refactor(scheduler): read the zone name from formatToParts
juliusmarminge 9f5f596
Merge branch 'fix/scheduler-timezone-short-label' of https://github.c…
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { expect, it } from "vite-plus/test"; | ||
|
|
||
| import { scheduleTimeZoneLabel } from "./scheduledTaskTimeZone.ts"; | ||
|
|
||
| it("uses short names instead of full IANA zones", () => { | ||
| expect(scheduleTimeZoneLabel(undefined)).toBeUndefined(); | ||
| expect(scheduleTimeZoneLabel("Unsupported/Zone")).toBeUndefined(); | ||
| expect(scheduleTimeZoneLabel("Etc/UTC")).toBe("UTC"); | ||
| expect(scheduleTimeZoneLabel("America/Los_Angeles")).toMatch(/^(PT|Los Angeles Time)$/); | ||
| expect(scheduleTimeZoneLabel("America/Los_Angeles", "2027-01-15T17:00:00Z")).toBe("PST"); | ||
| expect(scheduleTimeZoneLabel("America/Los_Angeles", "2027-07-15T16:00:00Z")).toBe("PDT"); | ||
| }); |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import * as DateTime from "effect/DateTime"; | ||
|
|
||
| /** | ||
| * Short label for the server zone a fixed-time schedule runs in. With a run time it names | ||
| * that instant's offset (PST/PDT); without one it uses the generic name (PT). | ||
| */ | ||
| export function scheduleTimeZoneLabel( | ||
| timeZone: string | undefined, | ||
| runAt?: string | null, | ||
| ): string | undefined { | ||
| if (timeZone === undefined) return undefined; | ||
| if (timeZone === "Etc/UTC" || timeZone === "UTC" || timeZone === "GMT") return "UTC"; | ||
| try { | ||
| return new Intl.DateTimeFormat("en-US", { | ||
| timeZone, | ||
| timeZoneName: runAt ? "short" : "shortGeneric", | ||
| }) | ||
| .formatToParts(runAt ? DateTime.toEpochMillis(DateTime.makeUnsafe(runAt)) : undefined) | ||
| .find((part) => part.type === "timeZoneName")?.value; | ||
| } catch { | ||
| return undefined; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.