Preston Landers <pland...@gmail.com> writes:
> SELECT TO_CHAR( TIMESTAMP WITH TIME ZONE 'epoch' + 1315503340 *
> INTERVAL '1 second', 'MM-DD-YYYY HH:MM:SS TZ');
> 09-08-2011 12:09:40 CDT

> As you can see, Python, SQL Server, and Oracle all agree that the
> timestamp 1315503340 means 12:35:40 CDT on that date.

So does Postgres.

regression=# set timezone = 'CST6CDT';
SET
regression=# select TIMESTAMP WITH TIME ZONE 'epoch' + 1315503340 *
INTERVAL '1 second';
        ?column?        
------------------------
 2011-09-08 12:35:40-05
(1 row)

> Yet PostgreSQL
> shows a value that is exactly 26 minutes behind the others (12:09:40).

You've fat-fingered the to_char usage --- MM is month, not minutes
(I think you want MI for that).

                        regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to