File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,34 @@ dependencies {
283
283
}
284
284
```
285
285
286
+ #### Note about time zones in JS
287
+
288
+ By default, there's only one time zone available in Kotlin/JS: the ` SYSTEM ` time zone with a fixed offset.
289
+
290
+ If you want to use all time zones in Kotlin/JS platform, you need to add the following npm dependency:
291
+
292
+ ``` kotlin
293
+ kotlin {
294
+ sourceSets {
295
+ val jsMain by getting {
296
+ dependencies {
297
+ implementation(npm(" @js-joda/timezone" , " 2.3.0" ))
298
+ }
299
+ }
300
+ }
301
+ }
302
+ ```
303
+
304
+ and after that add the following initialization code in your project:
305
+
306
+ ``` kotlin
307
+ @JsModule(" @js-joda/timezone" )
308
+ @JsNonModule
309
+ external object JsJodaTimeZoneModule
310
+
311
+ private val jsJodaTz = JsJodaTimeZoneModule
312
+ ```
313
+
286
314
### Maven
287
315
288
316
- Add the bintray repository to the ` <repositories> ` section.
You can’t perform that action at this time.
0 commit comments