How to add Indian timezone to Postgresql?

postgresql, postgresql-9.1

Solution

Buttom line: don't use IST, that's Israel time zone, not Indian time zone. use 'Asia/Kolkata'. instead.

Postgres documentation of this is vague, but notice that looking at:

SELECT name, abbrev, utc_offset, is_dst FROM pg_timezone_names;

will give you different options that those of, not showing all the available timezones.

SELECT abbrev, utc_offset, is_dst FROM pg_timezone_abbrevs;

and editing this file doesn't have any effect. don't bother. perhaps you need to manually change another config to include it.

/usr/share/postgresql/9.1/timezonesets/Asia.txt

Problem

i'm trying to find out what's the easiest way to add India Standard Time (+0530 from utc) to postgresql (9.1). i tried the silly thing of trying to insert it into the table, but it doesn't work. insert into pg_timezone_abbrevs values('INDIA','05:30:00'); the problem what detected years ago by other people, Googling in old mailing lists tells me. but not simple solution found.

Original source