File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,33 @@ external object JsJodaTimeZoneModule
478
478
private val jsJodaTz = JsJodaTimeZoneModule
479
479
```
480
480
481
+ #### Note about time zones in Wasm/JS
482
+
483
+ Wasm/JS uses the same time zone support as JS, so almost the same instructions apply.
484
+
485
+ In your Gradle build script, add the following dependency:
486
+
487
+ ``` kotlin
488
+ kotlin {
489
+ sourceSets {
490
+ val wasmJsMain by getting {
491
+ dependencies {
492
+ implementation(npm(" @js-joda/timezone" , " 2.3.0" ))
493
+ }
494
+ }
495
+ }
496
+ }
497
+ ```
498
+
499
+ and after that add the following initialization code in your project:
500
+
501
+ ``` kotlin
502
+ @JsModule(" @js-joda/timezone" )
503
+ external object JsJodaTimeZoneModule
504
+
505
+ private val jsJodaTz = JsJodaTimeZoneModule
506
+ ```
507
+
481
508
#### Note about time zones in Wasm/WASI
482
509
483
510
By default, there's only one time zone available in Kotlin/Wasm WASI: the ` UTC ` time zone with a fixed offset.
You can’t perform that action at this time.
0 commit comments