diff options
| author | xiphon <xiphon@protonmail.com> | 2019-08-13 14:25:16 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2019-08-13 14:25:16 +0000 |
| commit | 1ec22b3d0c56fcee53d832011672003aa7ac8f86 (patch) | |
| tree | ba174c1806b6945b4da029fc489f866648577418 | |
| parent | 55b4425c5db5d25e72dc9089d9ec5aac4f2c5ddf (diff) | |
| download | monzero-gui-1ec22b3d0c56fcee53d832011672003aa7ac8f86.tar.gz monzero-gui-1ec22b3d0c56fcee53d832011672003aa7ac8f86.tar.xz monzero-gui-1ec22b3d0c56fcee53d832011672003aa7ac8f86.zip | |
history: fix start/end of the day calculation, apply local timezone
| -rw-r--r-- | pages/History.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pages/History.qml b/pages/History.qml index 97b26fa2..4a1d9515 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -1361,8 +1361,9 @@ Rectangle { // applying filters root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy - var fromDate = fromDatePicker.currentDate.getTime() / 1000; - var toDate = toDatePicker.currentDate.getTime() / 1000; + 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 txs = []; for (var i = 0; i < root.txData.length; i++){ |
