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
UNIX time
global problem - timestamp
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.
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.