mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-21 18:24:41 +00:00
fix time format
This commit is contained in:
parent
efcfd625ec
commit
832ff62044
2 changed files with 4 additions and 4 deletions
|
@ -69,10 +69,10 @@ class HavenTransactionInfo extends TransactionInfo {
|
|||
: '~${(unlockTime - height) * 2} minutes';
|
||||
}
|
||||
|
||||
var locked = DateTime.fromMillisecondsSinceEpoch(unlockTime).compareTo(DateTime.now());
|
||||
var locked = DateTime.fromMicrosecondsSinceEpoch(unlockTime).compareTo(DateTime.now());
|
||||
final DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm:ss');
|
||||
final String formattedUnlockTime =
|
||||
formatter.format(DateTime.fromMillisecondsSinceEpoch(unlockTime));
|
||||
formatter.format(DateTime.fromMicrosecondsSinceEpoch(unlockTime));
|
||||
|
||||
return locked >= 0 ? '$formattedUnlockTime' : null;
|
||||
}
|
||||
|
|
|
@ -73,10 +73,10 @@ class MoneroTransactionInfo extends TransactionInfo {
|
|||
: '~${(unlockTime - height) * 2} minutes';
|
||||
}
|
||||
|
||||
var locked = DateTime.fromMillisecondsSinceEpoch(unlockTime).compareTo(DateTime.now());
|
||||
var locked = DateTime.fromMicrosecondsSinceEpoch(unlockTime).compareTo(DateTime.now());
|
||||
final DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm:ss');
|
||||
final String formattedUnlockTime =
|
||||
formatter.format(DateTime.fromMillisecondsSinceEpoch(unlockTime));
|
||||
formatter.format(DateTime.fromMicrosecondsSinceEpoch(unlockTime));
|
||||
|
||||
return locked >= 0 ? '$formattedUnlockTime' : null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue