Allow international formatted dates in CSV imports

This commit is contained in:
Andris Reinman 2017-02-02 16:47:50 +02:00
parent 1513c761bc
commit 9778c486e9
5 changed files with 27 additions and 15 deletions

View file

@ -11,9 +11,10 @@
let moment = require('moment-timezone');
let db = require('../lib/db');
let log = require('npmlog');
let lastCheck = false;
const timezone_timeout = 60 * 60 * 1000;
function updateTimezoneOffsets(callback) {
log.verbose('UTC', 'Updating timezone offsets');
db.getConnection((err, connection) => {
@ -45,7 +46,6 @@ module.exports = callback => {
return callback(err);
}
let checkLoop = () => {
const timezone_timeout = 60 * 60 * 1000;
let curUtcDate = new Date().toISOString().split('T').shift();
if (curUtcDate !== lastCheck) {
updateTimezoneOffsets(err => {