X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 83CB6D1CA2F for ; Tue, 5 Aug 2003 15:15:05 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 15360-07 for ; Tue, 5 Aug 2003 12:13:45 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 98962D1CA24 for ; Tue, 5 Aug 2003 12:14:54 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h75FEpSa022678; Tue, 5 Aug 2003 11:14:51 -0400 (EDT) To: "Anagha Joshi" Cc: pgsql-sql@postgresql.org Subject: Re: Timestamp in PG - 7.1 & 7.2 In-reply-to: References: Comments: In-reply-to "Anagha Joshi" message dated "Tue, 05 Aug 2003 15:51:52 +0530" Date: Tue, 05 Aug 2003 11:14:51 -0400 Message-ID: <22677.1060096491@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/40 X-Sequence-Number: 14656 "Anagha Joshi" 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