Код: Выделить всё
private fun getCurrentUTC(): Date {
val calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"))
return calendar.time
}
Код: Выделить всё
var date: Date = getCurrentUTC()
Код: Выделить всё
date before save in db : Sun Jun 02 17:33:14 CEST 2024
и он возвращает объект с неверной датой
Код: Выделить всё
"date":"2024-06-02T15:33:14.356+00:00"
Подробнее здесь: https://stackoverflow.com/questions/785 ... oid-kotlin
Мобильная версия