Page 1 of 1
UNIX time
Posted: Tue 13 Feb 2007 11:42
by andopo
Hi,
I have one field which contains UNIX time values, I try to create a datasource with such query:
SELECT to_timestamp((test.date_unix)::double precision) FROM test
I always get date: 2000-01-01 00:00:00
What is wrong?
Andrzej
Posted: Wed 14 Feb 2007 12:59
by Alexey
What is the version of your PostgreSQL server?
Please send me (alexeyi at crlab dot com) the dump of your test table.
global problem - timestamp
Posted: Wed 14 Feb 2007 14:29
by andopo
Hi,
I've noticed that the problem is with all timestamp fields. PostgreSQL version is 8.1.2 64 bit (also tested on 8.2.3 32 bit)
Test table DDL:
CREATE TABLE "public"."test" (
"id_test" SERIAL,
"date1" TIMESTAMP WITHOUT TIME ZONE,
"date2" DATE,
"date3" TIMESTAMP WITH TIME ZONE,
"godzina1" TIME WITHOUT TIME ZONE,
CONSTRAINT "test_pkey" PRIMARY KEY("id_test")
) WITHOUT OIDS;
All timestamp fields values are displayed wrong.
Funny thing is that when I test this test table on Windows everything is ok, under Linux (Suse 10.2) I got bad values.
Posted: Thu 15 Feb 2007 09:31
by Alexey
We will investigate this. Look forward to the results.
Posted: Mon 19 Feb 2007 14:53
by Alexey
Try to set Protocol=2 in your connection string.