Re: [GENERAL] binary timestamp conversion
От | H Hale |
---|---|
Тема | Re: [GENERAL] binary timestamp conversion |
Дата | |
Msg-id | 20051014200002.89011.qmail@web52315.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: [GENERAL] binary timestamp conversion
|
Список | pgsql-interfaces |
I originally incorrectly posted my question to the GENERAL list with the same subject. As I indicated in my original post I am trying to convert an binary timestamp (int64). After further experimentation I have yet to find a method to correctly convert the int64 value retrieved from a query. I save 1970-01-01 00:00:00 and read it back expecting the difference between postgres and unix epochs but get different results each time. (After conversion to host byte order). -946686612744257 -946684195712577 -946684196834881 I then tried using PGTYPEStimestamp_to_asc() just to see what it does and get.... 1969-12-31 23:07:28.818367 1969-12-31 23:38:40.464063 1969-12-31 23:52:03.009727 psql shows 1970-01-01 00:00:00 Using 2000-01-01 the minutes/seconds/fractional seconds varies as well. If request back dates formattea as strings, I get what psql shows, the correct result. Why would pg returning inconsistent binary timestampo results? Thanks __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
В списке pgsql-interfaces по дате отправления: