mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 20:36:44 +00:00
change transactions and utxos csv export to use utc timezone for dates
This commit is contained in:
parent
5a0df265bc
commit
0fed7c45ee
2 changed files with 6 additions and 2 deletions
|
@ -31,6 +31,10 @@ public class WalletTransactions implements WalletExport {
|
|||
|
||||
private final WalletForm walletForm;
|
||||
|
||||
static {
|
||||
DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
}
|
||||
|
||||
public WalletTransactions(WalletForm walletForm) {
|
||||
this.walletForm = walletForm;
|
||||
}
|
||||
|
@ -72,7 +76,7 @@ public class WalletTransactions implements WalletExport {
|
|||
try {
|
||||
CsvWriter writer = new CsvWriter(outputStream, ',', StandardCharsets.UTF_8);
|
||||
|
||||
writer.write("Date");
|
||||
writer.write("Date (UTC)");
|
||||
writer.write("Label");
|
||||
writer.write("Value");
|
||||
writer.write("Balance");
|
||||
|
|
|
@ -480,7 +480,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
|||
if(file != null) {
|
||||
try(FileOutputStream outputStream = new FileOutputStream(file)) {
|
||||
CsvWriter writer = new CsvWriter(outputStream, ',', StandardCharsets.UTF_8);
|
||||
writer.writeRecord(new String[] {"Date", "Output", "Address", "Label", "Value"});
|
||||
writer.writeRecord(new String[] {"Date (UTC)", "Output", "Address", "Label", "Value"});
|
||||
for(Entry entry : getWalletForm().getWalletUtxosEntry().getChildren()) {
|
||||
UtxoEntry utxoEntry = (UtxoEntry)entry;
|
||||
writer.write(utxoEntry.getBlockTransaction().getDate() == null ? "Unconfirmed" : WalletTransactions.DATE_FORMAT.format(utxoEntry.getBlockTransaction().getDate()));
|
||||
|
|
Loading…
Reference in a new issue