Re: Retrieving current date - Mailing list pgsql-general

From Ron Johnson
Subject Re: Retrieving current date
Date
Msg-id CANzqJaCUjceXYCB2F91tSADq6c8rXuJq-MSCAXWuGuJf61_oBQ@mail.gmail.com
Whole thread Raw
In response to Re: Retrieving current date  ("sivapostgres@yahoo.com" <sivapostgres@yahoo.com>)
List pgsql-general
On Thu, Jun 19, 2025 at 2:23 AM 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)

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: Extension disappearing act
Next
From: Adrian Klaver
Date:
Subject: Re: Retrieving current date