Skip to content

Commit daf4e81

Browse files
authoredJan 26, 2023
Port timestamp fix to 4.9 (#52426)
1 parent e286821 commit daf4e81

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/compiler/watch.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ namespace ts {
6060
export function getLocaleTimeString(system: System) {
6161
return !system.now ?
6262
new Date().toLocaleTimeString() :
63-
system.now().toLocaleTimeString("en-US", { timeZone: "UTC" });
63+
// On some systems / builds of Node, there's a non-breaking space between the time and AM/PM.
64+
// This branch is solely for testing, so just switch it to a normal space for baseline stability.
65+
// See:
66+
// - https://github.com/nodejs/node/issues/45171
67+
// - https://github.com/nodejs/node/issues/45753
68+
system.now().toLocaleTimeString("en-US", { timeZone: "UTC" }).replace("\u202f", " ");
6469
}
6570

6671
/**

0 commit comments

Comments
 (0)
Please sign in to comment.