save with local timezone

This commit is contained in:
Fran Jurmanović
2021-06-27 10:25:27 +02:00
parent 925ddf40ae
commit 2dded0a932

View File

@@ -22,7 +22,7 @@ func (as *TransactionService) New(body *models.NewTransactionBody) *models.Trans
tm.WalletID = body.WalletID
tm.TransactionTypeID = body.TransactionTypeID
tm.Description = body.Description
tm.TransactionDate = body.TransactionDate
tm.TransactionDate = body.TransactionDate.Local()
tm.Amount = float32(math.Round(amount*100) / 100)
if body.TransactionDate.IsZero() {