For India:
SELECT now() AT TIME ZONE 'Asia/Calcutta'; SELECT now()::timestamp AT TIME ZONE 'Asia/Kolkata'; SELECT now()::timestamp AT TIME ZONE '5:30';
For Nepal:
SELECT now()::timestamp AT TIME ZONE 'Asia/Katmandu'; SELECT now()::timestamp AT TIME ZONE 'NPT';
To set the time zone for an entire session:
SET time zone 'Asia/Calcutta';
In reset, it (in the time zone set in postgresql.conf:
RESET time zone;
Find pg_timezone_names and pg_timezone_abbrevs in the system views
SELECT * FROM pg_timezone_names WHERE utc_offset BETWEEN '05:00:00' AND '06:00:00' ORDER BY utc_offset; SELECT * FROM pg_timezone_abbrevs WHERE utc_offset BETWEEN '05:00:00' AND '06:00:00' ORDER BY utc_offset;
PostgreSQL Guide on AT TIME ZONE . About time zones .
source share