Perhaps this will help? Extract(epoch ..) eg:
SELECT EXTRACT(EPOCH FROM date_field) FROM record;
returns the time in seconds since the epoch like time() in C
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Bo Lorentsen
> Sent: Wednesday, 19 December 2001 12:36 AM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] PG sql string -> time_t
>
>
> Hi ...
>
> Have anyone implimetet a C/C++ "PG SQL date string" to time_t
> converter, that will be easy to copy, or is this a "do it
> your self" task :-)