DST problem on pg 8.2.5

Started by Joseph Shraibmanover 18 years ago3 messagesgeneral
Jump to latest
#1Joseph Shraibman
jks@selectacast.net

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?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Joseph Shraibman (#1)
Re: DST problem on pg 8.2.5

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

#3Joseph Shraibman
jks@selectacast.net
In reply to: Tom Lane (#2)
Re: DST problem on pg 8.2.5

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.