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/dblayer/functions_sqlite.inc.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/dblayer/functions_sqlite.inc.php') diff --git a/include/dblayer/functions_sqlite.inc.php b/include/dblayer/functions_sqlite.inc.php index 109f5f21d..c12116355 100644 --- a/include/dblayer/functions_sqlite.inc.php +++ b/include/dblayer/functions_sqlite.inc.php @@ -561,6 +561,11 @@ function pwg_db_get_weekday($date) return 'strftime(\'%w\',date('.$date.',\'-1 DAY\'))'; } +function pwg_db_date_to_ts($date) +{ + return 'UNIX_TIMESTAMP('.$date.')'; +} + // my_error returns (or send to standard output) the message concerning the // error occured for the last mysql query. function my_error($header, $die) -- cgit v1.2.3