[PR #544] [MERGED] Fixed now_helper for sqlite (time is missing) #3259

Closed
opened 2026-02-26 07:38:39 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/544
Author: @jlesage
Created: 8/6/2020
Status: Merged
Merged: 8/6/2020
Merged by: @jc21

Base: developHead: sqlite-now-helper-fix


📝 Commits (1)

  • 01660b5 Fixed now_helper for sqlite: it should also returns the time.

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 backend/models/now_helper.js (+1 -1)

📄 Description

The sqlite date('now') function returns only the current time.

# echo "SELECT date('now')"|sqlite3
2020-08-06

To be comparable to the NOW() function of mysql, the date and time should be returned. The datetime('now','localtime') function of sqlite does this:

# echo "SELECT datetime('now','localtime')"|sqlite3
2020-08-06 16:44:59

Which is the same thing as mysql:

# echo "SELECT NOW()"| mysql
NOW()
2020-08-06 16:44:59

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/544 **Author:** [@jlesage](https://github.com/jlesage) **Created:** 8/6/2020 **Status:** ✅ Merged **Merged:** 8/6/2020 **Merged by:** [@jc21](https://github.com/jc21) **Base:** `develop` ← **Head:** `sqlite-now-helper-fix` --- ### 📝 Commits (1) - [`01660b5`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/01660b5b805e94f1e5cba1802a526c5c127cf5b3) Fixed now_helper for sqlite: it should also returns the time. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/models/now_helper.js` (+1 -1) </details> ### 📄 Description The sqlite `date('now')` function returns only the current time. ``` # echo "SELECT date('now')"|sqlite3 2020-08-06 ``` To be comparable to the `NOW()` function of mysql, the date and time should be returned. The `datetime('now','localtime')` function of sqlite does this: ``` # echo "SELECT datetime('now','localtime')"|sqlite3 2020-08-06 16:44:59 ``` Which is the same thing as mysql: ``` # echo "SELECT NOW()"| mysql NOW() 2020-08-06 16:44:59 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 07:38:39 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#3259
No description provided.