timestamptz Insert

Поиск
Список
Период
Сортировка
От Seader, Cameron
Тема timestamptz Insert
Дата
Msg-id 71B8A8BEC516CF46835CA629156CF21110381A@bedford.idacorp.local
обсуждение исходный текст
Список pgsql-php
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.
Thedata 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
accuallyjust 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 ???

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
applicablelaw.  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
receivedthis transmission in error, please immediately contact the sender and destroy the material in its entirety,
whetherin electronic or hard copy format.  Thank you.   A2 



В списке pgsql-php по дате отправления:

Предыдущее
От: "Nick Barr"
Дата:
Сообщение: Re: Selecting from two tables
Следующее
От: Enrico Ortmann
Дата:
Сообщение: can't create db