Received: from cvis29.marconicomms.com (cvis29.marconicomms.com [195.99.244.61]) by hub.org (8.10.1/8.10.1) with ESMTP id e86FV9B39760 for ; Wed, 6 Sep 2000 11:31:09 -0400 (EDT) Received: from cvis01.gpt.co.uk (unverified) by cvis29.marconicomms.com (Content Technologies SMTPRS 4.1.5) with ESMTP id for ; Wed, 6 Sep 2000 16:24:52 +0100 Received: from marconicomms.com by cvis01.gpt.co.uk with SMTP (8.8.8+Sun/cvms-28) id QAA28723; Wed, 6 Sep 2000 16:24:52 +0100 (BST) Received: by marconicomms.com(Lotus SMTP MTA v4.6.3 (733.2 10-16-1998)) id 80256952.0054A14A ; Wed, 6 Sep 2000 16:24:23 +0100 X-Lotus-FromDomain: MCMAIN@MCEXT From: "Carl Shelbourne" To: pgsql-interfaces@postgresql.org Message-ID: <80256952.00549D8D.00@marconicomms.com> Date: Wed, 6 Sep 2000 16:23:59 +0100 Subject: ISO8601 Time and ODBC Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline X-Archive-Number: 200009/29 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