From d7fa727afabf29f8f14824d4b1fc2f2be65bfbc3 Mon Sep 17 00:00:00 2001 From: nikrou Date: Fri, 25 Jun 2010 19:45:19 +0000 Subject: Bug 1744 fixed : Incorrect use of timezone with SQLite Fixed anti-flood system. Merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6605 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 7e21e128c..109f5f21d 100644 --- a/include/dblayer/functions_sqlite.inc.php +++ b/include/dblayer/functions_sqlite.inc.php @@ -511,6 +511,11 @@ function pwg_db_get_recent_period($period, $date='CURRENT_DATE') return $d; } +function pwg_db_get_flood_period_expression($seconds) +{ + return 'datetime(\'now\', \'localtime\', \''.-$seconds.' seconds\')'; +} + function pwg_db_get_hour($date) { return 'strftime(\'%H\', '.$date.')'; -- cgit v1.2.3