pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedTimestamp in PG - 7.1 & 7.2
2+ messages / 2 participants
[nested] [flat]
* Timestamp in PG - 7.1 & 7.2
@ 2003-08-05 10:21 Anagha Joshi <ajoshi@nulinkinc.com>
2003-08-05 15:14 ` Re: Timestamp in PG - 7.1 & 7.2 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Anagha Joshi @ 2003-08-05 10:21 UTC (permalink / raw)
To: pgsql-sql
Hi,
I've observed this:
Here is output from PostgreSQL 7.1.2:
trapdb=# select cast(datetime(1057637700) as timestamp);
?column?
---------------------------
2003-07-08 09:45:00+05:30
(1 row)
Here is output from PostgreSQL 7.2.4:
trapdb=# select cast(datetime(1057637700) as timestamp);
timestamp
---------------------------
2003-07-07 22:45:00+05:30
(1 row)
I've migrated from PG - 7.1.2 to 7.2.4.
My timezone is set as "IST" in both cases.
Is this any version problem or I'm missing any envirnonment setting?
Help is appreciated....
Thanks,
Anagha
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Timestamp in PG - 7.1 & 7.2
2003-08-05 10:21 Timestamp in PG - 7.1 & 7.2 Anagha Joshi <ajoshi@nulinkinc.com>
@ 2003-08-05 15:14 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2003-08-05 15:14 UTC (permalink / raw)
To: Anagha Joshi <ajoshi@nulinkinc.com>; +Cc: pgsql-sql
"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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-08-05 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05 10:21 Timestamp in PG - 7.1 & 7.2 Anagha Joshi <ajoshi@nulinkinc.com>
2003-08-05 15:14 ` Tom Lane <tgl@sss.pgh.pa.us>
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