diff --git a/sharedUI/src/commonMain/kotlin/com/livrets/ui/HistoryScreen.kt b/sharedUI/src/commonMain/kotlin/com/livrets/ui/HistoryScreen.kt index f8a7a36..90d9435 100644 --- a/sharedUI/src/commonMain/kotlin/com/livrets/ui/HistoryScreen.kt +++ b/sharedUI/src/commonMain/kotlin/com/livrets/ui/HistoryScreen.kt @@ -34,6 +34,8 @@ import com.livrets.data.HistoryRepository import com.livrets.game.GameResult import com.livrets.game.TableStats import com.livrets.game.tableStats +import kotlinx.datetime.TimeZone +import kotlinx.datetime.toLocalDateTime import kotlin.time.Instant @Composable @@ -69,8 +71,10 @@ fun HistoryScreen( } } -private fun formatDate(date: Instant): String = - date.toString().take(16).replace('T', ' ') +private fun formatDate(date: Instant): String { + val local = date.toLocalDateTime(TimeZone.currentSystemDefault()) + return "${local.date} ${local.time.toString().take(5)}" +} @Composable private fun GamesTab(games: List) {