Thread: DST problem on pg 8.2.5

DST problem on pg 8.2.5

From
Joseph S
Date:
On one of my servers postgres thinks that we're back on standard time
already:

[local]:db=# select current_timestamp;
               now
-------------------------------
  2007-10-29 15:06:10.049795-05
(1 row)

Time: 0.807 ms
[local]:db=# select version();
                                               version
---------------------------------------------------------------------------------------------------
  PostgreSQL 8.2.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.6
20060404 (Red Hat 3.4.6-3)
(1 row)

Time: 37.631 ms

But the os itself doesn't have a problem:
 > date
Mon Oct 29 16:05:50 EDT 2007

On another machine with an 8.2.5 install it is working fine.  What could
have caused this?

Re: DST problem on pg 8.2.5

From
Tom Lane
Date:
Joseph S <jks@selectacast.net> writes:
> On one of my servers postgres thinks that we're back on standard time
> already:

What's its TimeZone setting?  What is the mod date of the corresponding
file in the $SHAREDIR/timezone/ directory (where $SHAREDIR means
whatever pg_config --sharedir says)?

It sounds to me like you've got obsolete timezone files, but 8.2.5 went
out with the latest info AFAIK.  Maybe you did an incomplete update?

            regards, tom lane

Re: DST problem on pg 8.2.5

From
Joseph S
Date:
Tom Lane wrote:
> Joseph S <jks@selectacast.net> writes:
>> On one of my servers postgres thinks that we're back on standard time
>> already:
>
> What's its TimeZone setting?

On the server that is working:
=> show TimeZone;
   TimeZone
------------
  US/Eastern
(1 row)

On the one that is broken:

  show TimeZone;
   TimeZone
------------
  posixrules
(1 row)


   What is the mod date of the corresponding
> file in the $SHAREDIR/timezone/ directory (where $SHAREDIR means
> whatever pg_config --sharedir says)?
>
The problem seems to have been that universal read permission (and on
the directories execute permission) was not granted on the
$SHAREDIR/timezone/ directory structure during install.  I fixed the
permissions and restarted postgres and now everything is fine.