Re: time without time zone
От | Richard Huxton |
---|---|
Тема | Re: time without time zone |
Дата | |
Msg-id | 4676E77C.7080602@archonet.com обсуждение исходный текст |
Ответ на | time without time zone (Garry Saddington <garry@schoolteachers.co.uk>) |
Список | pgsql-general |
Garry Saddington wrote: > This is a select on table periods defined as such: > CREATE TABLE periods > ( > periodid serial NOT NULL, > periodnumber integer NOT NULL, > periodstart time without time zone, > periodend time without time zone, > PRIMARY KEY (periodid) > ) > > Periodid Periodnumber Periodstart Periodend > 6 1 2007/06/18 09:00:00 GMT+0 2007/06/18 09:30:00 GMT+0 > 7 2 2007/06/18 09:30:00 GMT+0 2007/06/18 10:00:00 GMT+0 > Can anyone explain why time has todays date and time zone? I am confused, I > only want time, such as: > 13:00:00 You don't say what version you're running, but I can't reproduce this here on 8.2 - are you sure that table definition is right? CREATE TABLE timetest (t1 time, t2 time without time zone, t3 timestamp without time zone); INSERT INTO timetest values (now(),now(),now()); SELECT * FROM timetest; t1 | t2 | t3 -----------------+-----------------+---------------------------- 21:12:30.346289 | 21:12:30.346289 | 2007-06-18 21:12:30.346289 (1 row) -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: