From: Andrew Dolgov Date: Tue, 25 Nov 2008 05:39:13 +0000 (+0100) Subject: pgsql: force datestyle to european for PHP strtotime() compatibility X-Git-Tag: 1.2.30~29 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6fc720fd9ff06ceb2b1db89bb53c7af3d8a27dd2;p=tt-rss.git pgsql: force datestyle to european for PHP strtotime() compatibility --- diff --git a/functions.php b/functions.php index 4d3e8c7b..0adf9c5e 100644 --- a/functions.php +++ b/functions.php @@ -5851,8 +5851,9 @@ function init_connection($link) { if (DB_TYPE == "pgsql") { - pg_query("set client_encoding = 'UTF-8'"); + pg_query($link, "set client_encoding = 'UTF-8'"); pg_set_client_encoding("UNICODE"); + pg_query($link, "set datestyle = 'european'"); } else { if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) { db_query($link, "SET NAMES " . MYSQL_CHARSET);