Re: Timestamp confusion
От | Lukasz Brodziak |
---|---|
Тема | Re: Timestamp confusion |
Дата | |
Msg-id | AANLkTikqAeGe3KfeYr5SGn88r0nh1+H1cvP-6dPMk=YB@mail.gmail.com обсуждение исходный текст |
Ответ на | Timestamp confusion ("Rob Richardson" <Rob.Richardson@rad-con.com>) |
Ответы |
Re: Timestamp confusion
|
Список | pgsql-novice |
For me it seems that the time is shown using ISO-8601 format. Some reading on datetime and timestamps conversion: http://www.postgresql.org/docs/8.0/static/datatype-datetime.html http://www.postgresql.org/docs/8.0/static/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT Hope that helps. Regards Luke 2010/9/28 Rob Richardson <Rob.Richardson@rad-con.com>: > Greetings! > > I have a table with a column declared to contain a timestamp with time > zone. A database function inserts a row into this table using the > following statement: > > insert into alarm_hold (charge, hold_code, hold_generated, > condition_date) values (ChargeNum, '0471', 0, current_timestamp at time > zone 'UTC'); > > The resulting value contained in the timestamp field is 2010-09-28 > 13:09:27.015-04. > > Since I am in the Eastern time zone of the United States and daylight > savings time is in effect, the -04 indicates that it is 4 hours earlier > for me than it is in Greenwich, England. And this value was generated > at 9:09 this morning local time, so the 13:09 is understandable. > > The thing I am confused about is why the "-04" is there. This timestamp > should show a UTC time. But with the -04 in there, it seems to me that > it is showing an Eastern Daylight Time time. > > What don't I understand? > > Thanks very much! > > RobR > > -- > Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-novice > -- Łukasz Brodziak II MU Bioinformatyka
В списке pgsql-novice по дате отправления: