Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Fixed [BUG] DATE PROBLEM #3145 occuring both in main screen and in Tr…
Browse files Browse the repository at this point in the history
…ansaction card details (#3212)
  • Loading branch information
rishi2062 authored May 27, 2024
1 parent de19932 commit 5eb0e0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import com.ivy.legacy.datamodel.Account
import com.ivy.legacy.datamodel.toEntity
import com.ivy.legacy.domain.deprecated.logic.AccountCreator
import com.ivy.legacy.utils.computationThread
import com.ivy.legacy.utils.convertUTCToLocal
import com.ivy.legacy.utils.dateNowLocal
import com.ivy.legacy.utils.getTrueDate
import com.ivy.legacy.utils.ioThread
Expand Down Expand Up @@ -550,7 +551,7 @@ class EditTransactionViewModel @Inject constructor(

fun onSetTime(newTime: LocalTime) {
loadedTransaction = loadedTransaction().copy(
time = newTime
time = newTime.convertUTCToLocal()
)
time.value = newTime
onSetDateTime(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import androidx.compose.ui.unit.dp
import com.ivy.design.l0_system.UI
import com.ivy.design.l0_system.style
import com.ivy.legacy.IvyWalletComponentPreview
import com.ivy.legacy.utils.convertUTCtoLocal
import com.ivy.legacy.utils.formatNicely
import com.ivy.legacy.utils.formatTimeOnly
import com.ivy.legacy.utils.timeNowLocal
Expand Down Expand Up @@ -80,7 +79,7 @@ fun TransactionDateTime(
}
)
Text(
text = " " + (dateTime?.convertUTCtoLocal()?.formatTimeOnly() ?: timeNowLocal().formatTimeOnly()),
text = " " + (dateTime?.formatTimeOnly() ?: timeNowLocal().formatTimeOnly()),
style = UI.typo.nB2.style(
color = UI.colors.pureInverse,
fontWeight = FontWeight.ExtraBold
Expand Down

0 comments on commit 5eb0e0d

Please sign in to comment.