Skip to content

Commit

Permalink
Port timestamp fix to 4.9 (#52426)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanCavanaugh authored Jan 26, 2023
1 parent e286821 commit daf4e81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compiler/watch.ts
Original file line number Diff line number Diff line change
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

0 comments on commit daf4e81

Please sign in to comment.