fix: dates de l'historique en heure locale

This commit is contained in:
herel committed 2026-08-28 15:41:23 +02:00
1 parent a115647015
commit 1eb840d519
1 file changed
+6 -2
@@ -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<GameResult>) {