Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSFyp-005LPh-0K for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 14:11:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uSFyl-00Bdua-UP for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 14:11:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSFyk-00BduS-Qz for pgsql-general@lists.postgresql.org; Thu, 19 Jun 2025 14:11:00 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uSFyj-002tuM-0Y for pgsql-general@lists.postgresql.org; Thu, 19 Jun 2025 14:10:58 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1958D11401F4; Thu, 19 Jun 2025 10:10:56 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 19 Jun 2025 10:10:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1750342256; x=1750428656; bh=G+nwlNcIYDSXwcg6P5uj7BTRJ9y0pMIKWmykQnPzevc=; b= cKe3aBD/uUQhqAMa09NRjAqlyPDkltdscGDU/XRVsJClzlEQk/s8eBEApiE3oAdn mBJpuHPjpjacTMbvWMCzBgsNtc17xbR6hyma3ktdrKzq5fGUKl61RvjIUbDCMKGi tz/Ofl7TNKkqiFAoWSa0pWI/tKIS5VtHXv9/X2ke9qQ2TebXKpFk4N+VRouJqTn+ wg0Skuc+lXS64NDoNP4oSbYROfproQHHJUXvOeAKxiWI1tUSn705YA7VPfvkQRoE TvdSrh72qvg+k8LDO4tgXpABGye3YZLi56lRM6Wy8Gxoj6OaJ1Wd5uIxh+BI54MI IBWwOvV5OvlZpfhz+Y0nhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1750342256; x=1750428656; bh=G +nwlNcIYDSXwcg6P5uj7BTRJ9y0pMIKWmykQnPzevc=; b=A5Hjrvh+Bzl1RAkuI gadt99L8cSvuQyTGBD7fVvliWBu2gsMd33Ca1OnXGiOiY0IU67ayaiSoPAK/KpKh vy1dgLDMxwcaXSLs3Ii7plNnQOXBduYmXc2BozQUKIsmD1WZQOJuIOdKHXusD/hf IuVS9GnEBqYlPebCQnwaZel+2kdxhAfQr+EVfCzlJ6zlqKj3aXgjuQBSlukcV1W5 ohS2D4r+JQydr0A2EQOw0FxuiwVB4iyv3PBCdoZuCZiMKfCLasn48esaIQaZxtMT 1bC3vT4OW7yxYr9E9X7hPNn9/GlE5ARfM40xscMdvc8/RrcwLevDFWWSn+HMFGki IjRmg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdehjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvd ejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgv rhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepleegveekkeekueeigf dtveeileeuhfefudefteekjeffkeejueejheegheegkedtnecuffhomhgrihhnpehpohhs thhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhn sggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsihhvrg hpohhsthhgrhgvsheshigrhhhoohdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghn vghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Jun 2025 10:10:55 -0400 (EDT) Message-ID: <935dcc5f-0f78-4780-867e-8310b9f0d9fd@aklaver.com> Date: Thu, 19 Jun 2025 07:10:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Retrieving current date To: "sivapostgres@yahoo.com" , "pgsql-general@lists.postgresql.org" References: <411969169.208250.1750314188916.ref@mail.yahoo.com> <411969169.208250.1750314188916@mail.yahoo.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <411969169.208250.1750314188916@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/18/25 23:23, sivapostgres@yahoo.com wrote: > Hello, > May be a very basic question.  We all here are new to Linux / PostgreSQL > > Ubuntu Server 22.04 > PostgreSQL 15 > PgAdmin4 6.16 > > When I run the following query in pg_admin > > Select today_now > From   (Select localtimestamp(0) as today_now) a; > > I get UTC time and not the IST time, which I expect. > > How to change the setting(s), if any, to retrieve the current date and > time in IST? For setting see: https://www.postgresql.org/docs/current/runtime-config-client.html "TimeZone (string) Sets the time zone for displaying and interpreting time stamps. The built-in default is GMT, but that is typically overridden in postgresql.conf; initdb will install a setting there corresponding to its system environment. See Section 8.5.3 for more information. " For a quick fix, maybe?: select localtimestamp(0) at time zone 'Asia/Kolkata' as today_now; > > Happiness Always > BKR Sivaprakash > -- Adrian Klaver adrian.klaver@aklaver.com