Re: What is the binary format for timestamps? - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: What is the binary format for timestamps?
Date
Msg-id 23104.1112917952@sss.pgh.pa.us
Whole thread Raw
In response to What is the binary format for timestamps?  (Marvin Bellamy <marvin.bellamy@innovision.com>)
Responses Re: What is the binary format for timestamps?
List pgsql-interfaces
Marvin Bellamy <marvin.bellamy@innovision.com> writes:
> I'm trying to read/write timestamps as binary data, but I'm getting 
> garbage.  It looks like there are 8 bytes of timestamp data (if I read 
> the headers correctly), which I had assumed was the time in millis from 
> the PostgreSQL epoch, but my values are way off.

Are you using integer datetimes?  It should be either a float8 measured
in seconds, or an int8 measured in microseconds since the epoch.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Marvin Bellamy
Date:
Subject: What is the binary format for timestamps?
Next
From: ljb
Date:
Subject: Re: What is the binary format for timestamps?