the export file name uses browser time zone, the transaction time in exported file uses time zone in transaction

This commit is contained in:
MaysWind
2021-03-25 23:36:52 +08:00
parent 62d4ba605d
commit ffcbca01d9
9 changed files with 59 additions and 14 deletions
+6 -2
View File
@@ -1,9 +1,13 @@
package exporters
import "github.com/mayswind/lab/pkg/models"
import (
"time"
"github.com/mayswind/lab/pkg/models"
)
// DataExporter defines the structure of data exporter
type DataExporter interface {
// GetOutputContent returns the exported data
GetOutputContent(uid int64, transactions []*models.Transaction, accountMap map[int64]*models.Account, categoryMap map[int64]*models.TransactionCategory, tagMap map[int64]*models.TransactionTag, allTagIndexs map[int64][]int64) ([]byte, error)
GetOutputContent(uid int64, timezone *time.Location, transactions []*models.Transaction, accountMap map[int64]*models.Account, categoryMap map[int64]*models.TransactionCategory, tagMap map[int64]*models.TransactionTag, allTagIndexs map[int64][]int64) ([]byte, error)
}