Unix Technical Forum

Regarding Timezone

This is a discussion on Regarding Timezone within the Pgsql Performance forums, part of the PostgreSQL category; --> Hello, We have installed postgres 8.2.0 default time zone which postgres server using is template1=# SHOW timezone; TimeZone ----------- ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 11:01 AM
soni de
 
Posts: n/a
Default 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)


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 11:01 AM
Heikki Linnakangas
 
Posts: n/a
Default Re: Regarding Timezone

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/i...l#GUC-TIMEZONE

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 11:01 AM
A. Kretschmer
 
Posts: n/a
Default Re: Regarding Timezone

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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 11:02 AM
Tom Lane
 
Posts: n/a
Default Re: Regarding Timezone

"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/s...fig-files.html

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:03 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com