timestamptz insert

From: "Seader, Cameron" <CSeader(at)idahopower(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: timestamptz insert
Date: 2004-01-19 22:35:15
Message-ID: 71B8A8BEC516CF46835CA629156CF21163F73D@bedford.idacorp.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi,
I am having trouble with the following SQL insert

$createtbl = "CREATE TABLE $table (";
$createtbl .= "UTCTime timestamptz,";
$createtbl .= "error text,";
$createtbl .= "lowalarm bigint,";
$createtbl .= "highalarm bigint";
$createtbl .= "$points";
$createtbl .= ") ";

When i insert data into the timestamptz field it is automatically adding on
the time zone of MST which is not correct. The data that is being inserted
is not MST it is GMT. how do i make it insert as GMT.

note: it keeps the date and times the same, but it just adds the -07 to the
end of the timestamp. when it should accually just be adding -00 to the end
so that it stays in GMT format.

??? Do i need to do a SET timezone under psql on the database ???

Cameron Seader
Operations Center Technician II
CSeader(at)Idahopower(dot)com
1.208.388.2582 Office

[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. A2

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-01-19 23:00:03 Re: timestamptz insert
Previous Message Tom Lane 2004-01-19 20:49:01 Re: absolute beginner