Skip to content
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

Port timestamp fix to 4.9 #52426

Merged
merged 1 commit into from Jan 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/compiler/watch.ts
Expand Up @@ -60,7 +60,12 @@ namespace ts {
export function getLocaleTimeString(system: System) {
return !system.now ?
new Date().toLocaleTimeString() :
system.now().toLocaleTimeString("en-US", { timeZone: "UTC" });
// On some systems / builds of Node, there's a non-breaking space between the time and AM/PM.
// This branch is solely for testing, so just switch it to a normal space for baseline stability.
// See:
// - https://github.com/nodejs/node/issues/45171
// - https://github.com/nodejs/node/issues/45753
system.now().toLocaleTimeString("en-US", { timeZone: "UTC" }).replace("\u202f", " ");
}

/**
Expand Down