nginx-proxy-manager/backend/models/now_helper.js

14 lines
307 B
JavaScript
Raw Normal View History

const db = require('../db');
const config = require('../lib/config');
const Model = require('objection').Model;
Model.knex(db);
module.exports = function () {
if (config.isSqlite()) {
2023-03-17 04:23:12 +00:00
// eslint-disable-next-line
return Model.raw("datetime('now','localtime')");
}
return Model.raw('NOW()');
};