Обсуждение: Regarding Timezone
Hello,
We have installed postgres 8.2.0
default time zone which postgres server using is
template1=# SHOW timezone;
TimeZone
-----------
ETC/GMT-5
(1 row)
TimeZone
-----------
ETC/GMT-5
(1 row)
But we want to set this timezone parameter to IST.
Our system timezone is also in IST. We are using solaris.
Please provide me some help regarding this.
Thanks,
Soni
soni de wrote: > But we want to set this timezone parameter to IST. > Our system timezone is also in IST. We are using solaris. This is the performance-list, and this is not a performance-related question. Please use the pgsql-general or pgsql-novice list for this kind of questions. PostgreSQL should pick up the correct timezone from system configuration. I don't know why that's not happening in your case, but you can use the "timezone" parameter in postgresql.conf to set it manually. See manual: http://www.postgresql.org/docs/8.2/interactive/runtime-config-client.html#GUC-TIMEZONE -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
am Tue, dem 19.06.2007, um 13:12:58 +0530 mailte soni de folgendes: > Hello, > > We have installed postgres 8.2.0 > > default time zone which postgres server using is > > template1=# SHOW timezone; > TimeZone > ----------- > ETC/GMT-5 > (1 row) > > > But we want to set this timezone parameter to IST. > Our system timezone is also in IST. We are using solaris. ALTER DATABASE foo SET TIMEZONE TO 'bla'; You can alter the template-database. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
"soni de" <soni.de@gmail.com> writes: > But we want to set this timezone parameter to IST. Which "IST" are you interested in? Irish, Israel, or Indian Standard Time? Postgres prefers to use the zic timezone names, which are less ambiguous. Try this to see likely options: regression=# select * from pg_timezone_names where abbrev = 'IST'; name | abbrev | utc_offset | is_dst ---------------+--------+------------+-------- Asia/Calcutta | IST | 05:30:00 | f Asia/Colombo | IST | 05:30:00 | f Europe/Dublin | IST | 01:00:00 | t Eire | IST | 01:00:00 | t (4 rows) If you're after Indian Standard Time, set timezone to 'Asia/Calcutta'. You'll probably also want to set timezone_abbreviations to 'India' so that "IST" is interpreted the way you want in timestamp datatype input. See http://www.postgresql.org/docs/8.2/static/datetime-config-files.html regards, tom lane