Merge pull request #544 from jlesage/sqlite-now-helper-fix
Fixed now_helper for sqlite (time is missing)
This commit is contained in:
commit
d68656559c
@ -6,7 +6,7 @@ Model.knex(db);
|
|||||||
|
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
if (config.database.knex && config.database.knex.client === 'sqlite3') {
|
if (config.database.knex && config.database.knex.client === 'sqlite3') {
|
||||||
return Model.raw('date(\'now\')');
|
return Model.raw('datetime(\'now\',\'localtime\')');
|
||||||
} else {
|
} else {
|
||||||
return Model.raw('NOW()');
|
return Model.raw('NOW()');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user