Skip to content
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

Missing support of some java.time._ classes #7

Open
plokhotnyuk opened this issue Jan 31, 2021 · 5 comments
Open

Missing support of some java.time._ classes #7

plokhotnyuk opened this issue Jan 31, 2021 · 5 comments

Comments

@plokhotnyuk
Copy link

plokhotnyuk commented Jan 31, 2021

I got linkage errors due missing of following classes when adding SN support for jsoniter-scala using this library (plokhotnyuk/jsoniter-scala#640):
java.time.ZonedDateTime$
java.time.LocalDateTime$
java.time.OffsetTime$
java.time.ZoneOffset$
java.time.OffsetDateTime$
java.time.ZoneId$
java.time.format.DateTimeFormatter$

https://github.com/plokhotnyuk/jsoniter-scala/pull/640/checks?check_run_id=1801112956#step:7:524

@ekrich
Copy link
Owner

ekrich commented Feb 2, 2021

@plokhotnyuk Thanks for the report.

@sideeffffect
Copy link

sideeffffect commented Feb 9, 2021

For ZIO, we would need

  • java.time.ZoneId.of(String zoneId)
  • java.time.OffsetDateTime.now()
  • java.time.OffsetDateTime.ofInstant(Instant instant, ZoneId zone)
  • java.time.temporal.TemporalAdjusters.firstDayOfNextMonth()
  • java.time.temporal.TemporalAdjusters.lastDayOfMonth()
  • java.time.ZoneOffset.ofTotalSeconds(int totalSeconds)
  • java.time.ZoneOffset.UTC

zio/zio#4671

@ekrich
Copy link
Owner

ekrich commented Feb 10, 2021

@sideeffffect Thanks for the info.

@plokhotnyuk
Copy link
Author

@ekrich Small and efficient implementation of .parse and .toString implementation for java.time._ types can be borrowed from here.

@ekrich
Copy link
Owner

ekrich commented Jun 26, 2021

Thank-you @plokhotnyuk. I will gladly take contributions if you or @sideeffffect have some cycles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants