Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gthfe-0007ym-Fc for pgsql-general@arkaria.postgresql.org; Tue, 12 Feb 2019 23:40:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gthfd-0005NV-8Y for pgsql-general@arkaria.postgresql.org; Tue, 12 Feb 2019 23:40:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gthfc-0005NJ-Sx; Tue, 12 Feb 2019 23:40:57 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gthfZ-0006cb-JT; Tue, 12 Feb 2019 23:40:55 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A3A3722022; Tue, 12 Feb 2019 18:40:52 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 12 Feb 2019 18:40:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=3 vpA5qCCvCv07PQ3jZqaRpBg4+/kFCAAkUbyeAfH8HE=; b=b2Q2qdHSR3jsS6T/i FmOo9Bz+GKIMEyiIcxbk2286gUXEbovJxHg8H4qSGVftcudex2pXNJknqfdkptCT d4RLlmjljaS+hsNg0ZocGGuZFzmG+2v6nvFCdcRnT0xqxkY1l5pI5o7bWnu970zz 6YfR1SnpZEDGeSv0Q1zRGxVQ7tzyLy1ZScI1iOVK6kUM0uLmH3hUbZrVGCKMZsWk HyAQwOGmFXG5RKeqeZk9xM37518SzW+NPiiKSRmV45jdSgcG53e4kNYhYEzJfwMK Mqo3kZ4fGcAdEF3IP22GPSrMpgKpHHCBhddqgzgi9erJReVfCSi+hVa9rbDS5n6v s0KAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=3vpA5qCCvCv07PQ3jZqaRpBg4+/kFCAAkUbyeAfH8 HE=; b=m2V9Vqs96agvPa6hMyszRCgXM7XoAgBZa0vo5TOton01TI8ggOufFx/J4 Aja/kxW/TC1FIhz5Sa7eB2TTX7TEIPREtuEF8cWCLtjMChwIpEDmsig7H9ItDPjp I3OQwlx+asRPmRCSxq14DRd99AdUNK1lIWP/IOAq12kEhllF5FjB6CvTp7AvMR+X I05IHr7QkgRkpJz2YO1sMsXsCn5I+6IrFNOh6gi5BTdz2h7UNPfURWe+hzmRDnsT MQcwcgn6MUn/hV/89vyp1zQkS8Miy0lzxMd0jg4GRDvMosih7CvSlxWlKUAWB2Jx yIJ4RLLQbXNPU5n3oOziQRXgXnnNw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddtvddgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkff gfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceo rggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuffhomhgrihhnpe honhgvlhhinhhkrdhmvgenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgr mhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 86BC3E409D; Tue, 12 Feb 2019 18:40:51 -0500 (EST) Subject: Re: Getting wrong time using now() To: "op12om@yahoo.co.in" , Postgres General , Postgres List References: <747290055.2254380.1550014566188.ref@mail.yahoo.com> <747290055.2254380.1550014566188@mail.yahoo.com> From: Adrian Klaver Message-ID: <187833af-6e2d-e84a-da49-62d6da8b2ccc@aklaver.com> Date: Tue, 12 Feb 2019 15:40:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <747290055.2254380.1550014566188@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/12/19 3:36 PM, Om Prakash Jaiswal wrote: > Create table service_record(Id into, time timestamp without time zone > default now()). > Postgresql version 9.6.6, RHEL7.6 , when I am executing the query. I am > getting time 5:30hours behind current time. Please solve it Move clock back 5:30 hours:). On serious note: 1) I would change the time field to timestamp with timezone. 2) Verify what timezone the server is running on: show timezone; TimeZone ------------ US/Pacific > > > Regards > Om Prakash > Bangalore, India > > Sent from Yahoo Mail on Android > -- Adrian Klaver adrian.klaver@aklaver.com