06-27-2018, 05:56 PM
(06-27-2018, 05:21 PM)askmike Wrote: @mark.sch very strange, is this also happening with the sqlite adapter?
@henry that issue was fixed yesterday here, please pull the branch again!
Yes, both on postgres and sqlite unfortunately. What I figured out so far, it seems to be an GMT+2 and UTC issue. When you run an --import, then 2 hours of data are missing, e.g. we have 16:30h local time, then data is only written until 14:40h. The realtime run is unable to write the gap on kraken.
var from = moment.utc(daterange.from);
if(daterange.to) {
var to = moment.utc(daterange.to);
} else {
var to = moment().utc();
log.debug(
'No end date specified for importing, setting to',
to.format('YYYY-MM-DD HH:mms')
);
}
This code is from import.js. When I change to:
var from = moment(daterange.from);
if(daterange.to) {
var to = moment(daterange.to);
} else {
var to = moment();
log.debug(
'No end date specified for importing, setting to',
to.format('YYYY-MM-DD HH:mms')
);
}
and the config this way:
config.importer = {
daterange: {
// NOTE: these dates are in UTC
from: "2018-06-27T00:00:00Z"
//from: "2018-06-27 00:00:00"
}
}
I get all import data until 16:30h local time, except a couple of minutes missing. However the next real run is not adding any data to the db anymore. With blank db it is adding data.