-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZoneRulesException without timezone #257
Comments
I guess it is because, contrary to what the doc says, the default system timezone is used by default instead of UTC. If it is not what the doc mean, then it should be fixed to specify that one need to use UTC explicitly. Ex: |
I think you're right. it will try to guess the local timezone, it is better to set a default one. |
Documentation updates and fix for #257
I came to this issue because I started to get this exception after upgrading from udash-0.8.0 to udash-0.9.0. Udash used https://github.com/zoepepper/scalajs-jsjoda in previous versions. I am not sure what its implementation of |
When I am using this in a frontend (browser), what way can I use to set the default timezone to something reasonable? I do not want users to have to tell me their timezone, there surely must by some simpler way. |
The code tries to guess the timezone but it is not always successful I'd suggest you try to verify what is being selected with that piece of code. |
The following code works in scala:
LocalDateTime.now()
.But in Scalajs it throws:
java.time.zone.ZoneRulesException: Unknown time-zone ID: Europe/Oslo
.I do not intend to use any timezone.
Scalajs version: 1.5.0
scala-java-time version: 2.1.0
The text was updated successfully, but these errors were encountered: