diff --git a/shared/domain/src/main/java/com/ivy/domain/usecase/csv/ExportCsvUseCase.kt b/shared/domain/src/main/java/com/ivy/domain/usecase/csv/ExportCsvUseCase.kt index 27b59c1db1..494213f015 100644 --- a/shared/domain/src/main/java/com/ivy/domain/usecase/csv/ExportCsvUseCase.kt +++ b/shared/domain/src/main/java/com/ivy/domain/usecase/csv/ExportCsvUseCase.kt @@ -4,7 +4,6 @@ import android.net.Uri import arrow.core.Either import com.ivy.base.model.TransactionType import com.ivy.base.threading.DispatchersProvider -import com.ivy.base.time.convertToLocal import com.ivy.data.file.FileSystem import com.ivy.data.model.Account import com.ivy.data.model.AccountId @@ -24,6 +23,7 @@ import org.apache.commons.text.StringEscapeUtils import java.text.DecimalFormat import java.text.DecimalFormatSymbols import java.time.Instant +import java.time.ZoneId import java.time.format.DateTimeFormatter import java.util.Locale import javax.inject.Inject @@ -187,8 +187,9 @@ class ExportCsvUseCase @Inject constructor( id = id ) - private fun Instant.csvFormat(): String = convertToLocal() - .format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) + private fun Instant.csvFormat(): String { + return this.atZone(ZoneId.of("UTC")).toLocalDateTime().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } private fun Double.csvFormat(): String = DecimalFormat(NUMBER_FORMAT).apply { decimalFormatSymbols = DecimalFormatSymbols.getInstance(Locale.ENGLISH)