Skip to content

Commit

Permalink
Add a note about timezone DB dependency in Kotlin/JS
Browse files Browse the repository at this point in the history
Fixes #71
  • Loading branch information
ilya-g committed Nov 25, 2020
1 parent 3076ba6 commit e6f720f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Expand Up @@ -283,6 +283,34 @@ dependencies {
}
```

#### Note about time zones in JS

By default, there's only one time zone available in Kotlin/JS: the `SYSTEM` time zone with a fixed offset.

If you want to use all time zones in Kotlin/JS platform, you need to add the following npm dependency:

```kotlin
kotlin {
sourceSets {
val jsMain by getting {
dependencies {
implementation(npm("@js-joda/timezone", "2.3.0"))
}
}
}
}
```

and after that add the following initialization code in your project:

```kotlin
@JsModule("@js-joda/timezone")
@JsNonModule
external object JsJodaTimeZoneModule

private val jsJodaTz = JsJodaTimeZoneModule
```

### Maven

- Add the bintray repository to the `<repositories>` section.
Expand Down

0 comments on commit e6f720f

Please sign in to comment.