From 01660b5b805e94f1e5cba1802a526c5c127cf5b3 Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Thu, 6 Aug 2020 17:16:22 -0400 Subject: [PATCH] Fixed now_helper for sqlite: it should also returns the time. --- backend/models/now_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/models/now_helper.js b/backend/models/now_helper.js index a1258a8..def16d0 100644 --- a/backend/models/now_helper.js +++ b/backend/models/now_helper.js @@ -6,7 +6,7 @@ Model.knex(db); module.exports = function () { if (config.database.knex && config.database.knex.client === 'sqlite3') { - return Model.raw('date(\'now\')'); + return Model.raw('datetime(\'now\',\'localtime\')'); } else { return Model.raw('NOW()'); }