Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YPzdK-0004if-4A for pgsql-general@arkaria.postgresql.org; Mon, 23 Feb 2015 20:29:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YPzdJ-0007Bv-F8 for pgsql-general@arkaria.postgresql.org; Mon, 23 Feb 2015 20:29:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YPzdI-0007Bp-2n for pgsql-general@postgresql.org; Mon, 23 Feb 2015 20:29:36 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YPzdD-0002XW-Qx for pgsql-general@postgresql.org; Mon, 23 Feb 2015 20:29:35 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1E63920B3C for ; Mon, 23 Feb 2015 15:29:29 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Mon, 23 Feb 2015 15:29:29 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= x-sasl-enc:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=k3iAdYSDZIUcRZOuhyjjiqnVOaw=; b=ZRQA8CHWqNzICVqsg+ SsUshxdb3R+isxgt++dSlthdQZQF9UazTZRLepHiurQ60qtuISOfi6BJq4BCHipZ ShW12RB1Oeg1jCHkBUvNTvOKuN+gHWtCNAhmiAlfgLitxjdYADq620pWtM49kETd 7GEnWhIYxOcM2AOsekT4UxhOQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=k3iAdYSDZIUcRZOuhyjjiq nVOaw=; b=uBiKEf4nADXRc3L5G0w03Qw4oOdX7DBWvGl7OgBomXqRxiUyeDdCxR hZpjRgO/9loTZx58ucEA7ELlKafFkn2nhi03nlYHJoTUnHN/CFnLQtiDlumQ/8Qe luJ17xWmKLhnRaXW0LkJiXF/F9/kaRvqBEjVPxAa1kmC9vCLCYK0Q= X-Sasl-enc: o+wSw3I78EfXGOLDW09/QfCfO9hD5nhHxMEUMEIER0+c 1424723369 Received: from killi.site (unknown [24.17.179.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 11CFE6801F1; Mon, 23 Feb 2015 15:29:28 -0500 (EST) Message-ID: <54EB8DA8.6060302@aklaver.com> Date: Mon, 23 Feb 2015 12:29:28 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: George Woodring , Tom Lane CC: Dave Cramer , pgsql-general Subject: Re: SQL solution for my JDBC timezone issue References: <31121.1424706593@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On 02/23/2015 12:15 PM, George Woodring wrote: > This is what I was looking for, however the JDBC does something to make > its timezone the default. > > My cluster is set to GMT, I have a DB that is set to US/Pacific, when I > get the connection from JDBC it is US/Eastern. The reset command does > not affect it. I can set timezone in the code to 'US/Pacific" and I see > it change, when I do another RESET timezone it goes back to US/Eastern. In your original post you mentioned that access to the databases is through a Web server. Is there just one Web server with one time zone? > > Thanks, > George Woodring > > iGLASS Networks > www.iglass.net > > On Mon, Feb 23, 2015 at 10:49 AM, Tom Lane > wrote: > > George Woodring > writes: > > Yes, that is where we think we are heading, the issue is that the code does > > not know what it needs to be set back to. We have 90 databases with 5 > > different time zones. I was just hoping for a more elegant solution than > > writing a lookup table that says if you are connecting to db x then set to > > timezone y. > > "RESET timezone" ? > > regards, tom lane > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general