@@ -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