diff --git a/core/utils/src/main/java/ru/stersh/youamp/core/utils/Time.kt b/core/utils/src/main/java/ru/stersh/youamp/core/utils/Time.kt index fd1a774b..48e47bd9 100644 --- a/core/utils/src/main/java/ru/stersh/youamp/core/utils/Time.kt +++ b/core/utils/src/main/java/ru/stersh/youamp/core/utils/Time.kt @@ -2,10 +2,16 @@ package ru.stersh.youamp.core.utils import java.text.SimpleDateFormat import java.util.Date +import java.util.TimeZone private const val ONE_HOUR_MS = 3600000L -private val minuteTimeFormat = SimpleDateFormat("mm:ss") -private val hourTimeFormat = SimpleDateFormat("hh:mm:ss") +private val utcTimeZone = TimeZone.getTimeZone("UTC") +private val minuteTimeFormat = SimpleDateFormat("mm:ss").apply { + timeZone = utcTimeZone +} +private val hourTimeFormat = SimpleDateFormat("hh:mm:ss").apply { + timeZone = utcTimeZone +} fun formatSongDuration(time: Long): String { return if (time >= ONE_HOUR_MS) {