Skip to content

Commit daf4e81

Browse files
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

Lines changed: 6 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy