I'm running system on CentOS 6.x with Postgresql installed:
PostgreSQL 9.0.11 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52), 64-bit
The problem I faced now looks like folowing:
PostgreSQL configuration:
\#timezone = unknown # actually, defaults to TZ environment
Session configuration from psql:
select setting
from pg_settings
where name in ('TimeZone', 'timezone_abbreviations');
Israel
Default
---- - OS timezone is Israel: zdump -v /etc/localtime |grep 2013 /etc/localtime Thu Mar 28 23:59:59 2013 UTC = Fri Mar 29 01:59:59 2013 IST isdst=0 gmtoff=7200 /etc/localtime Fri Mar 29 00:00:00 2013 UTC = Fri Mar 29 03:00:00 2013 IDT isdst=1 gmtoff=10800 /etc/localtime Sat Oct 26 22:59:59 2013 UTC = Sun Oct 27 01:59:59 2013 IDT isdst=1 gmtoff=10800 /etc/localtime Sat Oct 26 23:00:00 2013 UTC = Sun Oct 27 01:00:00 2013 IST isdst=0 gmtoff=7200 ----
Now - the shift from summer timezone as per zdump should be done at Sun Oct 27 01:00:00. When I run
select '2013-09-06 00:00:00'::timestamptz it shows date in +03 timezone - 2013-09-06 00:00:00+03
But when I run
select '2013-09-08 00:00:00'::timestamptz it shows date in +02 timezone - 2013-09-06 00:00:00+02 but it should show it in +03 as timezone shift will be only at
for 2013-09-06 00:00:00'::timestamptz Sun Oct 27 01:00:00.
So there are 2 questions:
- How postgresql keep the date of timezone shift and how it's possible to check the current value.
- How can I fix this problem.