timestamptz Insert

timestamptz Insert

am 15.01.2004 23:41:03 von CSeader

hi,
I am having trouble with the following SQL insert

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

When i insert data into the timestamptz field it is automatically adding o=
n the time zone of MST which is not correct. The data that is being inserte=
d is not MST it is GMT. how do i make it insert as GMT.=20

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 en=
d so that it stays in GMT format.

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

thanks,
Cameron Seader
Operations Center Technician II
CSeader@Idahopower.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 int=
ended recipient, you are hereby notified that any disclosure, copying, dist=
ribution, or use of the information contained herein (including any relianc=
e thereon) is STRICTLY PROHIBITED. If you received this transmission in err=
or, please immediately contact the sender and destroy the material in its e=
ntirety, whether in electronic or hard copy format. Thank you. A2



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend