Skip to content

Commit e8dade6

Browse files
authored
Set the timezone if it is undefined (#27444)
1 parent 0079058 commit e8dade6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
425425
try {
426426
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
427427
} catch { }
428-
MONO.mono_wasm_setenv("TZ", timeZone);
428+
MONO.mono_wasm_setenv("TZ", timeZone || "UTC");
429429
// Turn off full-gc to prevent browser freezing.
430430
const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']);
431431
mono_wasm_enable_on_demand_gc(0);

0 commit comments

Comments
 (0)