From 804d79a625aacaac774832c1ea5230c996bb57f1 Mon Sep 17 00:00:00 2001 From: nikrou Date: Tue, 6 Jul 2010 12:14:17 +0000 Subject: Bug 1766 fixed : [PostgreSQL] unkown database function UNIX_TIMESTAMP() Add a new function pwg_db_date_to_ts() to calculate a timestamp from a date git-svn-id: http://piwigo.org/svn/trunk@6666 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_session.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/functions_session.inc.php') diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php index 1c01f98ab..f8c3a4c58 100644 --- a/include/functions_session.inc.php +++ b/include/functions_session.inc.php @@ -175,7 +175,7 @@ function pwg_session_gc() $query = ' DELETE FROM '.SESSIONS_TABLE.' - WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(expiration) > ' + WHERE '.pwg_db_date_to_ts('NOW()').' - '.pwg_db_date_to_ts('expiration').' > ' .$conf['session_length'].' ;'; pwg_query($query); -- cgit v1.2.3