Commit 002cf2e7 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Fix date formatter.

parent 30fd4ae1
......@@ -43,10 +43,7 @@ fun Throwable.userMessage(resourceManager: ResourceManager) = when (this) {
private val DATE_FORMAT = DateTimeFormatter.ofPattern("dd MMM yyyy")
fun OffsetDateTime.humanTime(resources: Resources): String {
val now = OffsetDateTime.now()
val ui = OffsetDateTime.of(toLocalDateTime(), now.offset)
val delta = Duration.between(ui, now)
val delta = Duration.between(this, OffsetDateTime.now())
.seconds
.let { maxOf(0, it) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment