timestamp arithmetic - Mailing list pgsql-bugs

From Ed L.
Subject timestamp arithmetic
Date
Msg-id 200412161817.44721.pgsql@bluepolka.net
Whole thread Raw
Responses Re: timestamp arithmetic
List pgsql-bugs
Note the queries below generate the same result regardless of the timezone input:

% env | grep TZ
PGTZ=CST6CDT
TZ=CST6CDT

% psql -t -c "select version()"
 PostgreSQL 8.0.0beta3 on i686-pc-linux-gnu, compiled by GCC 2.96

% psql -t -c "select '1970-01-01 00:00:00+09'::timestamp + '1089352800 seconds'::interval"
 2004-07-09 06:00:00

% psql -t -c "select '1970-01-01 00:00:00+03'::timestamp + '1089352800 seconds'::interval"
 2004-07-09 06:00:00

% psql -t -c "select '1970-01-01 00:00:00+01'::timestamp + '1089352800 seconds'::interval"
 2004-07-09 06:00:00

Ed

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Checkpoints occur too frequently
Next
From: Tom Lane
Date:
Subject: Re: timestamp arithmetic