mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
History: set fromDate hour to 0:00 and toDate hour to 23:59
This commit is contained in:
parent
b6682330a6
commit
d3a689d857
1 changed files with 3 additions and 4 deletions
|
@ -1439,9 +1439,8 @@ Rectangle {
|
|||
// applying filters
|
||||
root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy
|
||||
|
||||
const timezoneOffset = new Date().getTimezoneOffset() * 60;
|
||||
var fromDate = Math.floor(fromDatePicker.currentDate.getTime() / 86400000) * 86400 + timezoneOffset;
|
||||
var toDate = (Math.floor(toDatePicker.currentDate.getTime() / 86400000) + 1) * 86400 + timezoneOffset;
|
||||
var fromDate = fromDatePicker.currentDate.setHours(0, 0, 0, 0);
|
||||
var toDate = toDatePicker.currentDate.setHours(23, 59, 59, 999);
|
||||
|
||||
var txs = [];
|
||||
for (var i = 0; i < root.txData.length; i++){
|
||||
|
@ -1449,7 +1448,7 @@ Rectangle {
|
|||
var matched = "";
|
||||
|
||||
// daterange filtering
|
||||
if(item.timestamp < fromDate || item.timestamp > toDate){
|
||||
if(item.timestamp * 1000 < fromDate || item.timestamp * 1000 > toDate){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue