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 1ruE9U-003ft3-Fb for pgsql-general@arkaria.postgresql.org; Tue, 09 Apr 2024 16:16:53 +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 1ruE9T-007Jan-0P for pgsql-general@arkaria.postgresql.org; Tue, 09 Apr 2024 16:16:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ruE9S-007JXC-KT for pgsql-general@lists.postgresql.org; Tue, 09 Apr 2024 16:16:50 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ruE9Q-0002wJ-DZ for pgsql-general@lists.postgresql.org; Tue, 09 Apr 2024 16:16:50 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-6183472760dso1699177b3.1 for ; Tue, 09 Apr 2024 09:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712679406; x=1713284206; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=a8JCZjpXPDJufNax/nJ4fkveQsDcBL5VED7893HkYBg=; b=eQ15fJ76zsoAg3v2/6Ml/sJ8ShfL/OdCZQuu65bQHal9fh/5fXR8uMKupvbz/BM/QY vl3v+e1LwnxRGFBjpkPhxW2JFPCRmUaQdTDpijtPfxIEG18J13MDATsPcdxuM6Qmz0IP Qguwa4dSNbIdV+8hgB/SFYSJV/1pZVigXh5/W6IECc48yxLA5pKjHTnOzqRdchBa7aRh rbZTFO/WSk5mJdU5a7LAlFcxebYQYM2y/+9rRdp3Twl4e7dXgUx3qLeGLbm/d1qwF5hu U14POaoHpnoMqFC7rXiWUauVv/tvZKl+zhZ7blYqwIHTnPAZKB4tQgYFT5KSwDfvgXuo 78GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712679406; x=1713284206; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a8JCZjpXPDJufNax/nJ4fkveQsDcBL5VED7893HkYBg=; b=gx2gGO6ceE0+ZScHTJmmJ9R+yxcITe0Q5eVgrkfvJdKy/7TBhTUGD9D29rCzD/fmGT g7oeG7rtEX8M5HDLYq89UpF8oR6iWUN42iSaCrjbT/5Q/o5JsOjJvZ+Cmso3mkrWsnw1 +Y04TsVFQrXCUvMPviC7wFJDcUdYadGHw0+AWo8ff5mZT8ch7kANaJAJDU+0dFWsM7Lz lMHRNKOnZBm8Gz971iCT17f7j2FwpCluvlMZRxDZpkblo6MGSM8EQIUz9YGDO38VRfHO 0V4z7rH5DsazuvKsmKOK9+lxBA8xhhS8PAchzTA9YW4WS/hj4ta2ur+JHMfeG5lW9+BY mTew== X-Gm-Message-State: AOJu0YxfMbFA99bgikbX+eUVhmLxaKOtPBDaFCSd9IiRcgrdP3LQ8o+L YrucmmJLs0HRz3mfNcH7UYDlsA2pXmhF/OHQ8SmBseEBkqnKpB1ZJ8r3QTl9LoQx62K52iIpF5n nIyFhew0z6HRMybcIQEC63aEJrvBGocaaeVY= X-Google-Smtp-Source: AGHT+IEa3ItmBmRVFu8QOpLsJParH0TfKlXwByCWnXSnaEUFsWrLMtUBBnYM3o930gtplgzo2Fpxc/K+Mvg4CLVRapg= X-Received: by 2002:a81:410a:0:b0:611:f6e:96b1 with SMTP id o10-20020a81410a000000b006110f6e96b1mr162911ywa.0.1712679406404; Tue, 09 Apr 2024 09:16:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Lok P Date: Tue, 9 Apr 2024 21:46:35 +0530 Message-ID: Subject: Re: Issue with date/timezone conversion function To: Adrian Klaver Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000a20caa0615ac3fbc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a20caa0615ac3fbc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 9, 2024 at 9:26=E2=80=AFPM Adrian Klaver wrote: > On 4/9/24 08:43, Lok P wrote: > > Hi All, > > It's version 15.4 of postgresql database. Every "date/time" data type > > attribute gets stored in the database in UTC timezone only. One of the > > support persons local timezone is "asia/kolkata" and that support > > person needs to fetch the count of transactions from a table- > > transaction_tab and share it with another person/customer who is in the > > EST timezone, so basically the transaction has to be shown or displayed > > the EST timezone. > > What is the datatype for the create_timestamp? > > What does SHOW timezone; return on the server? > > > Thank you for the quick response. The column data type for "create_timestamp" is "timestamptz'. Show timezone from the support users client machine UI showing "Asia/Calcutta". Not having access to run "Show timezone" on the server currently, I will try to get it. output from pg_setting showing setting as "Asia/Calcutta', reset_val as "Asia/Calcutta", boot_val as "GMT" --000000000000a20caa0615ac3fbc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tue, Apr 9, 2024 at 9:26=E2=80=AFPM Ad= rian Klaver <adrian.klaver@= aklaver.com> wrote:
On 4/9/24 08:43, Lok P wrote:
> Hi All,
> It's version 15.4 of postgresql database. Every "date/time&qu= ot; data type
> attribute gets stored in the database in UTC timezone only. One of the=
> support persons local timezone is "asia/kolkata" and =C2=A0t= hat support
> person needs to fetch the count of transactions from a table-
> transaction_tab and share it with another person/customer who is in th= e
> EST timezone, so basically the transaction has to be shown or displaye= d
> the EST timezone.

What is the datatype for the create_timestamp?

What does SHOW timezone; return on the server?



Thank you for the quick response.<= /div>

The column data type for "create_timestamp&qu= ot; is "timestamptz'.=C2=A0
Show timezone from the suppo= rt users client machine UI showing=C2=A0 "Asia/Calcutta".=C2=A0
Not having access to run "Show timezone" on the server c= urrently, I will try to get it.
output=C2=A0from pg_setting showi= ng setting as "Asia/Calcutta', reset_val as "Asia/Calcutta&qu= ot;, boot_val as "GMT"
--000000000000a20caa0615ac3fbc--