]> git.wh0rd.org Git - tt-rss.git/commitdiff
pgsql: force datestyle to european for PHP strtotime() compatibility
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 25 Nov 2008 05:39:13 +0000 (06:39 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 25 Nov 2008 05:39:13 +0000 (06:39 +0100)
functions.php

index 4d3e8c7b6660c2f4e096105058c1683938fab571..0adf9c5ea1061ea37dcc36471243b9cc26f55883 100644 (file)
 
        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);