diff options
| author | Joe Bordes <joe@tsolucio.com> | 2023-10-18 09:28:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-18 09:28:25 +0200 |
| commit | 4700171afa6c5f939e8d04b079331e207dea22ca (patch) | |
| tree | caeea408fd0afea76647475de8b6c423b253c1ff /drivers/adodb-sqlite.inc.php | |
| parent | f86db42bded690064ac1b38e293b33c5a2d1c313 (diff) | |
| download | adodb-4700171afa6c5f939e8d04b079331e207dea22ca.tar.gz adodb-4700171afa6c5f939e8d04b079331e207dea22ca.tar.bz2 adodb-4700171afa6c5f939e8d04b079331e207dea22ca.zip | |
Remove remaining ADOdb date/time function calls
This is a follow-up on commit bffa42e206d758af3095b8a0bdbf3c3ad8fb5e51.
Following removal of adodb-time library, some function calls were not
cleaned up in the code base. This fixes that.
Includes a standalone test script to validate the functionality.
Fixes #970 (PR #1002)
Diffstat (limited to 'drivers/adodb-sqlite.inc.php')
| -rw-r--r-- | drivers/adodb-sqlite.inc.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/adodb-sqlite.inc.php b/drivers/adodb-sqlite.inc.php index 697d43a6..00638e70 100644 --- a/drivers/adodb-sqlite.inc.php +++ b/drivers/adodb-sqlite.inc.php @@ -36,8 +36,8 @@ class ADODB_sqlite extends ADOConnection { var $hasInsertID = true; /// supports autoincrement ID? var $hasAffectedRows = true; /// supports affected rows for update/delete? var $metaTablesSQL = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"; - var $sysDate = "adodb_date('Y-m-d')"; - var $sysTimeStamp = "adodb_date('Y-m-d H:i:s')"; + var $sysDate = "date('Y-m-d')"; + var $sysTimeStamp = "date('Y-m-d H:i:s')"; var $fmtTimeStamp = "'Y-m-d H:i:s'"; function ServerInfo() @@ -164,14 +164,12 @@ class ADODB_sqlite extends ADOConnection { function SQLDate($fmt, $col=false) { $fmt = $this->qstr($fmt); - return ($col) ? "adodb_date2($fmt,$col)" : "adodb_date($fmt)"; + return ($col) ? "strftime($fmt,$col)" : "strftime($fmt)"; } function _createFunctions() { - @sqlite_create_function($this->_connectionID, 'adodb_date', 'adodb_date', 1); - @sqlite_create_function($this->_connectionID, 'adodb_date2', 'adodb_date2', 2); } |
