kotlinx-datetime icon indicating copy to clipboard operation
kotlinx-datetime copied to clipboard

Add `java.time.Clock` converter

Open GrahamBorland opened this issue 2 years ago • 2 comments

Adds a function to convert a java.time.Clock to a kotlinx.datetime.Clock.

GrahamBorland avatar Feb 07 '23 12:02 GrahamBorland

Could you describe cases when such conversion could be useful?

ilya-g avatar Apr 28 '23 17:04 ilya-g

When you have a Java clock (e.g. injected from DI on Android) and you want to pass it to a KMP library using kotlinx-datetime.

GrahamBorland avatar Apr 29 '23 09:04 GrahamBorland