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 1uSFHS-005D5Z-1T for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 13:26:14 +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 1uSFHO-00BQPv-W2 for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 13:26:11 +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 1uSFHO-00BQPm-H6 for pgsql-general@lists.postgresql.org; Thu, 19 Jun 2025 13:26:11 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uSFHJ-002tbb-2K for pgsql-general@postgresql.org; Thu, 19 Jun 2025 13:26:10 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-2e541e0b974so559493fac.1 for ; Thu, 19 Jun 2025 06:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750339565; x=1750944365; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=A0sbiFNMUmY6O2TAFdgetQAx4uAH9r6aqHOCj5a/gPo=; b=W7JZQsKkg9eyRPfhcSS4qxZ/E34o+OnRRJwtVsJqXJoMO6ftnjXmbfR0y2zIFoGcTS dxgefR/AQbe2ZuYHmY+Yl9+9d8TaO8z2cBA/TBpPd3zjXEtVx5v9eF/3xCcGHJexxGyd gUva7MWTo2nie0aQPCBXCvrmONn1kRWDl7581iBNpaIP97Ixge8PIauy3jemACd6aWgG ASUBrvUYtMv82TDWuNCmPCma+HB2YE5RVyl56kLomdz7KpCM8ZvpBvctc5yz5lc82yDf eR4fMbtaGZ1wXVL0A9uUQjLhGIFINxy6wTUNaDfw3XsQwy7Qg1Yv7tl9WqEIiHjDAl1c zCzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750339565; x=1750944365; h=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=A0sbiFNMUmY6O2TAFdgetQAx4uAH9r6aqHOCj5a/gPo=; b=JXQQAfnqGT5QiVJSBL1vRPNP36QdHvSnOW/InoXbpsJ6u7GNfZWrdjfYuats0UziW5 yq2S7AdWxBBbNBq7pPEVMsqCpgyd4xmD0315Ihi5jRHU7ns5g1+PqstKAUJHzWq/eYv3 bid+N8ooycVwGLQ7q95EDSmKhnLzP7M2FdgUDKq4Zn1bo+x2DzV2Hak+1jnQujVth7yu /xVlvKk4hWUjrtuG3tUyjek3l9q4cWxXlEwl8LlNQoOKZwKBs4giHkNSIkh6kpy2jQ87 0+PF37cb66PskPdI4bXuqPXC47yLSR/0ifs/NezzroRihz0Ke3ljxZcWPqLdYsfyghki +Jnw== X-Gm-Message-State: AOJu0YyDHtAM8tZLsghg6U0WXgMdcMtzTuJm1JDxxZLQ+/5jZjND6jrX 0US9IcUeODsLANB33OzZk7/6Gm8lsG4reYrtYoGEHfflQDTjdeGAqtQfWEew/Ip63q2fRH0UNQn HGr3QxT46nmsZtyF1Az4kwDUSQF7cqUmecI4V X-Gm-Gg: ASbGnctfi2tO5UpVyr5X0bMF9gtwTAiyHP6WOGeEgkKm25vhPYJInLpTJLRAugGepUZ oQ1YZ1sg4EZYii3iNkm1XCtdHcb5e/W5VzhomAn2SaPqesx0u0IC0V61Ap3LAbkkxStIZlB989J mGaMk2gSoTeZDtuRw4q1lVDOxgZMZraGDB+VXCuyA6sTgz X-Google-Smtp-Source: AGHT+IEUccOujsYoinx9fjOH0RKbkvIBqapVQ+E5qBuPnZKaurEN/GccfjrLFwBBnZXXZ8tTVNZsytOVj2RIallDHpE= X-Received: by 2002:a05:6870:64a1:b0:2c1:44a9:fc16 with SMTP id 586e51a60fabf-2eaf0bf166bmr10721094fac.38.1750339564718; Thu, 19 Jun 2025 06:26:04 -0700 (PDT) MIME-Version: 1.0 References: <411969169.208250.1750314188916.ref@mail.yahoo.com> <411969169.208250.1750314188916@mail.yahoo.com> In-Reply-To: <411969169.208250.1750314188916@mail.yahoo.com> From: Ron Johnson Date: Thu, 19 Jun 2025 09:25:53 -0400 X-Gm-Features: AX0GCFuhpDClqrtBpxIUiLodFj20A_vJWfULeoa3cx4u4J_NiCkYSrXHf2pVB08 Message-ID: Subject: Re: Retrieving current date To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000fdd0150637ecaff3" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fdd0150637ecaff3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 19, 2025 at 2:23=E2=80=AFAM sivapostgres@yahoo.com < 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? > In addition, see what time zone the Linux server is at: $ timedatectl | grep zone Time zone: America/New_York (EDT, -0400) --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000fdd0150637ecaff3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jun 19, 2025 at 2:23=E2=80=AFAM <= a href=3D"mailto:sivapostgres@yahoo.com">sivapostgres@yahoo.com <sivapostgres@yahoo.com> wrote= :
Hello,
May be a very basic question.=C2=A0 W= e 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=C2=A0
From=C2= =A0 =C2=A0(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 ret= rieve the current date and time in IST?
=

In addition, see what time zone the Linux s= erver is at:

$ timedatect= l | grep zone
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Ti= me zone: America/New_York (EDT, -0400)

--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lo= bster!
--000000000000fdd0150637ecaff3--