From: Tom Lane <tgl@sss.pgh.pa.us>
To: Anagha Joshi <ajoshi@nulinkinc.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Timestamp in PG - 7.1 & 7.2
Date: Tue, 05 Aug 2003 11:14:51 -0400
Message-ID: <22677.1060096491@sss.pgh.pa.us> (raw)
In-Reply-To: <FF851C7EEB75954F9BCFB5CA117AB1EC61A555@delta.nulinkinc.com>
References: <FF851C7EEB75954F9BCFB5CA117AB1EC61A555@delta.nulinkinc.com>
"Anagha Joshi" <ajoshi@nulinkinc.com> writes:
> Here is output from PostgreSQL 7.2.4:
> =20
> trapdb=3D# select cast(datetime(1057637700) as timestamp);
> timestamp
> ---------------------------
> 2003-07-07 22:45:00+05:30
> (1 row)
> =20
> I've migrated from PG - 7.1.2 to 7.2.4.
Not sure why 7.2 is misbehaving here --- it looks to me like it's adding
instead of subtracting the timezone offset, but I don't see any mention
of having fixed such a bug in the CVS logs.
I'd suggest changing your code to abstime(n) instead of datetime(n) ---
you will have to do that when you update to 7.3 anyway, and it gets the
right answer on 7.2.
regards, tom lane
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, ajoshi@nulinkinc.com
Subject: Re: Timestamp in PG - 7.1 & 7.2
In-Reply-To: <22677.1060096491@sss.pgh.pa.us>
* 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