diff options
author | Keith Whyte <keith@rhizomatica.org> | 2022-05-14 22:20:48 +0200 |
---|---|---|
committer | Keith Whyte <keith@rhizomatica.org> | 2022-05-14 22:20:48 +0200 |
commit | 7c0a0a0be138cfdfcb7a7dd5c477ee85634373de (patch) | |
tree | dd54e38692629a8036c8a561464a595e96be8937 | |
parent | ef097fc0304fb49dda866a4c66e9cf7bda167108 (diff) |
Don't use sqlite3 Function UNIXEPOCH()keith/sqlite3_no_unixepoch
This function is only available since version 3.38.0
Change-Id: I2660bfa1a7507aa200d3e3c0d7ca645eecf4c998
-rw-r--r-- | src/libmsc/db.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmsc/db.c b/src/libmsc/db.c index f8f84f4b4..b12889f7a 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -541,10 +541,10 @@ rollback: * database query results! */ #define SEL_COLUMNS \ "id," \ - "unixepoch(created)," \ + "strftime('%s',created)," \ "sent," \ "deliver_attempts," \ - "unixepoch(valid_until)," \ + "strftime('%s',valid_until)," \ "reply_path_req," \ "status_rep_req," \ "is_report," \ @@ -631,9 +631,9 @@ static const char *stmt_sql[] = { [DB_STMT_SMS_DEL_EXPIRED] = "DELETE FROM SMS WHERE id = $id", [DB_STMT_SMS_GET_VALID_UNTIL_BY_ID] = - "SELECT unixepoch(valid_until) FROM SMS WHERE id = $id", + "SELECT strftime('%s',valid_until) FROM SMS WHERE id = $id", [DB_STMT_SMS_GET_OLDEST_EXPIRED] = - "SELECT id, unixepoch(valid_until) FROM SMS ORDER BY valid_until LIMIT 1", + "SELECT id, strftime('%s',valid_until) FROM SMS ORDER BY valid_until LIMIT 1", }; /*********************************************************************** |