Skip to content
Permalink
Browse files

history: fix start/end of the day calculation, apply local timezone

  • Loading branch information...
xiphon committed Aug 13, 2019
1 parent 55b4425 commit 1ec22b3d0c56fcee53d832011672003aa7ac8f86
Showing with 3 additions and 2 deletions.
  1. +3 −2 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++){

0 comments on commit 1ec22b3

Please sign in to comment.
You can’t perform that action at this time.