Skip to content

Commit

Permalink
Properly handle completedDate for Revolut
Browse files Browse the repository at this point in the history
Report uses completedDate to determine whether or not a transaction should be included in the report. Revolut data now includes not just the date but also the time. While this is useful, it alters the report's decision which results in some transactions being incorrectly included. To match AIB transaction data, the time is now stripped from Revolut transaction data when being handled by the report.
  • Loading branch information
stonish committed Oct 13, 2021
1 parent 8f00286 commit 2784205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transactions/revolutTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func NewRevolutTransaction(rawData string) *revolutTransaction {
}

func (t revolutTransaction) GetCompletedDate() time.Time {
return t.completedDate
return time.Date(t.completedDate.Year(), t.completedDate.Month(), t.completedDate.Day(), 0, 0, 0, 0, time.UTC)
}

func (t revolutTransaction) Output() {
Expand Down

0 comments on commit 2784205

Please sign in to comment.