pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vishal Arora <aroravishal22@hotmail.com>
To: Shilpa <shilpa.sudhakar@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Time Zone in Postgres
Date: Thu, 6 Mar 2008 12:15:41 +0530
Message-ID: <BLU110-W581D897155BF62F438C486A9120@phx.gbl> (raw)
In-Reply-To: <2d6659d70803052151q5861981aw3a1a2e39e3970704@mail.gmail.com>
References: <2d6659d70803051856x652174a5ic8655d070a95db59@mail.gmail.com>
	<BLU110-W2010012C95121A7D325BF9A9120@phx.gbl>
	<2d6659d70803052151q5861981aw3a1a2e39e3970704@mail.gmail.com>








Hi, I've been working on a timezone issue. I am in Adelaide Australia and the daylight savings time this year has been changed. I am trying to figure out the file which is required to be changed. I've done the below research:1) Checked the postgresql.conf file and the timezone parameter is set as "unknown". According to the documentation, if this parameter is set to unknown then postgresql will first look at the TZ parameter, if the TZ parameter doesn't exist then it looks at the system time. This means that postgres should look at the OS level time but am confused with varied results from different queries as explained below. 2) I ran the below query in 2 different postgresql databases and found that both show different resultsServer 1:echo select timestamp with time zone \'epoch\' + 1206970200 \* INTERVAL \'1 second\'\; | psql template1          ?column? ---------------------------  2008-03-31 23:00:00+09:30 (1 row) Server2: echo select timestamp with time zone \'epoch\' + 1206970200 \* INTERVAL \'1 second\'\; | psql template1          ?column? ---------------------------  2008-04-01 00:00:00+10:30 (1 row) Server 2 is right.3) I ran the below command:/local/pkg/share/postgresql/timezone/Australia $ /usr/sbin/zdump -v Australia/Adelaide | grep 2007Australia/Adelaide  Sat Mar 24 16:29:59 2007 UTC = Sun Mar 25 02:59:59 2007 CST isdst=1Australia/Adelaide  Sat Mar 24 16:30:00 2007 UTC = Sun Mar 25 02:00:00 2007 CST isdst=0Australia/Adelaide  Sat Oct 27 16:29:59 2007 UTC = Sun Oct 28 01:59:59 2007 CST isdst=0Australia/Adelaide  Sat Oct 27 16:30:00 2007 UTC = Sun Oct 28 03:00:00 2007 CST isdst=1Is this above detail from OS level or from Postgres Level ?4) I tried finding the timezone files and found them under /local/pkg/share/postgresql/timezone/AustraliaI tried opening the Adelaide file under this folder but the file is not readable. Can you please let me know if i need to change the settings in this file or in someother file. I am not able to find good documentation on this. 5) One more query: /local/pkgsrc/databases/postgresql80-pgcrypto/work/postgresql-8.0.9/src/timezone/data $ grep 2007 australasiaRule    AS      2007    max     -       Mar     lastSun 2:00s   0       -Rule    AT      2007    max     -       Mar     lastSun 2:00s   0       -Rule    AV      2007    max     -       Mar     lastSun 2:00s   0       -Rule    AN      2007    max     -       Mar     lastSun 2:00s   0       -Rule    LH      2007    max     -       Mar     lastSun 2:00    0       -/local/pkgsrc/databases/postgresql80-pgcrypto/work/postgresql-8.0.9/src/timezone/data $ grep 2008 australasiaNo resultsBasically, i want to know from where does postgresql get the time and where should i modify the DST settings. Thanks and Regards,Shilpa


Live the life in style with MSN Lifestyle. Check out! Try it now!
_________________________________________________________________
Post ads for free - to sell, rent or even buy.www.yello.in
http://ss1.richmedia.in/recurl.asp?pid=186=

view thread (18+ messages)  latest in thread

Message-ID: <BLU110-W581D897155BF62F438C486A9120@phx.gbl>
Permalink:  ../BLU110-W581D897155BF62F438C486A9120@phx.gbl/
Also on:    postgresql.org/message-id/BLU110-W581D897155BF62F438C486A9120@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: aroravishal22@hotmail.com, shilpa.sudhakar@gmail.com
  Subject: Re: Time Zone in Postgres
  In-Reply-To: <BLU110-W581D897155BF62F438C486A9120@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox