mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 11:54:44 -06:00
Port timestamp fix to 4.9 (#52426)
This commit is contained in:
parent
e2868216f6
commit
daf4e817a1
@ -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", " ");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user