diff --git a/lib/Stats.js b/lib/Stats.js index fcdcc0a2fc8..0b828b3fb10 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -974,18 +974,15 @@ class Stats { } if (typeof obj.builtAt === "number") { const builtAtDate = new Date(obj.builtAt); - let timeZone = null; + let timeZone; try { - timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; + builtAtDate.toLocaleTimeString(); } catch (err) { - // disregard the RangeError - } - - // Force UTC if runtime timezone could not be detected. - if (!timeZone || timeZone.toLowerCase() === "etc/unknown") { + // Force UTC if runtime timezone is unsupported timeZone = "UTC"; } + colors.normal("Built at: "); colors.normal( builtAtDate.toLocaleDateString(undefined, {