Consider moving Instant
and Clock
to the standard library
#382
Labels
breaking change
This could break existing code
Milestone
Obtaining the current instant is often needed, as is doing some
Duration
-based operations on it.Instant
is useful even when the rest of the library isn't: you don't need the timezone functionality to log human-readable timestamps (#121 (comment)) or represent file access and modification times (okio), or sort events, etc.With this change, the kotlinx-datetime library would provide calendar- and timezone-aware operations, whereas
Instant
,Duration
,Clock
, andTimeSource
would work with just "the flow of time" as seen by the computer.Instant
should probably stay in thekotlinx-datetime
library, as they aren't very meaningful without the notion of a calendar.InstantIso8601Serializer
andInstantComponentSerializer
would probably enter thekotlinx-serialization
library in some form.The text was updated successfully, but these errors were encountered: