ISO8601 Time and ODBC

From: "Carl Shelbourne" <Carl(dot)Shelbourne(at)marconi(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ISO8601 Time and ODBC
Date: 2000-09-06 15:23:59
Message-ID: 80256952.00549D8D.00@marconicomms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I am trying to get a fully qualified ISO8601 string

yyyy-mm-dd hh:mm:ss.h+MM:SS where MM:SS are the time offsets to GMT.

I am Using Postgres 7, UNIXodbc.

Using psql to query the table I get the time as:

2000-08-30 12:00:00+01

But the query via ODBC returns a SQL_C_TYPE_TIMESTAMP struct defined as

SQL_C_TYPE_TIMESTAMP SQL_TIMESTAMP_STRUCT struct tagTIMESTAMP_STRUCT {
SQLSMALLINT year;
SQLUSMALLINT month;
SQLUSMALLINT day;
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
SQLUINTEGER fraction;
} TIMESTAMP_STRUCT;

The problem I have is I am working across timezones and I need to know the time
offset to GMT. Currently I am in the UK on BST +01:00, which psql seems to
return,

Does anybody know how I can get the offset to the time returned by Postgres
using ODBC??, this is not included in the above struct.

Thanks

Carl

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Alec Smecher 2000-09-06 20:01:33 JDBC Insert row?
Previous Message Bob Kline 2000-09-06 12:56:53 Re: JDBC Driver Help...