Skip to content

Commit b32dfa8

Browse files
authored
Update MonoPlatform.ts
1 parent 663915b commit b32dfa8

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,6 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
256256
`_framework/${icuDataResourceName}`,
257257
resourceLoader.bootConfig.resources.runtime[icuDataResourceName],
258258
'globalization');
259-
} else {
260-
// Use invariant culture if the app does not carry icu data.
261-
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
262259
}
263260

264261
// 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
288285

289286
if (icuDataResource) {
290287
loadICUData(icuDataResource);
288+
} else {
289+
// Use invariant culture if the app does not carry icu data.
290+
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
291291
}
292292

293293
// Fetch the assemblies and PDBs in the background, telling Mono to wait until they are loaded
@@ -382,12 +382,6 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
382382
// Turn off full-gc to prevent browser freezing.
383383
const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']);
384384
mono_wasm_enable_on_demand_gc(0);
385-
386-
let timeZone = "UTC";
387-
try {
388-
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
389-
} catch { }
390-
MONO.mono_wasm_setenv("TZ", timeZone);
391385
const load_runtime = cwrap('mono_wasm_load_runtime', null, ['string', 'number']);
392386
// -1 enables debugging with logging disabled. 0 disables debugging entirely.
393387
load_runtime(appBinDirName, hasDebuggingEnabled() ? -1 : 0);

0 commit comments

Comments
 (0)