From b32dfa8c50bd487fad8602c7df9282a444d73e16 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 26 Aug 2020 12:15:12 -0700 Subject: [PATCH] Update MonoPlatform.ts --- .../Web.JS/src/Platform/Mono/MonoPlatform.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index c2c0cb3302..4844d7ba11 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -256,9 +256,6 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade `_framework/${icuDataResourceName}`, resourceLoader.bootConfig.resources.runtime[icuDataResourceName], 'globalization'); - } else { - // Use invariant culture if the app does not carry icu data. - MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1"); } // Override the mechanism for fetching the main wasm file so we can connect it to our cache @@ -288,6 +285,9 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade if (icuDataResource) { loadICUData(icuDataResource); + } else { + // Use invariant culture if the app does not carry icu data. + MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1"); } // Fetch the assemblies and PDBs in the background, telling Mono to wait until they are loaded @@ -382,12 +382,6 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade // Turn off full-gc to prevent browser freezing. const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']); mono_wasm_enable_on_demand_gc(0); - - let timeZone = "UTC"; - try { - timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; - } catch { } - MONO.mono_wasm_setenv("TZ", timeZone); const load_runtime = cwrap('mono_wasm_load_runtime', null, ['string', 'number']); // -1 enables debugging with logging disabled. 0 disables debugging entirely. load_runtime(appBinDirName, hasDebuggingEnabled() ? -1 : 0);