mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
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 Merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6667 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -596,6 +596,11 @@ function pwg_db_get_weekday($date)
|
||||
return 'EXTRACT(ISODOW FROM '.$date.')::INTEGER - 1';
|
||||
}
|
||||
|
||||
function pwg_db_date_to_ts($date)
|
||||
{
|
||||
return 'EXTRACT(EPOCH FROM '.$date.')';
|
||||
}
|
||||
|
||||
// my_error returns (or send to standard output) the message concerning the
|
||||
// error occured for the last pgsql query.
|
||||
function my_error($header, $die)
|
||||
|
||||
Reference in New Issue
Block a user