Fixup for postgres change

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@29442 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-01-29 13:36:01 +00:00
parent 1b88d7bb36
commit 1006966504
2 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2010-01-29 Richard Frith-Macdonald <rfm@gnu.org>
* Postgres.m: Fix to cope with a new date format in recent postgres.
2009-11-18 Richard Frith-Macdonald <rfm@gnu.org> 2009-11-18 Richard Frith-Macdonald <rfm@gnu.org>
Many tweaks to build under OSX snow leopard. Many tweaks to build under OSX snow leopard.

View file

@ -688,14 +688,16 @@ static unsigned int trim(char *str)
{ {
int e; int e;
/* If it's a simple date (YYYY-MM-DD) append time for start of day. */ i = l;
if (l == 10) /* Convert +/-HH:SS timezone to +/-HHSS
*/
if (i > 5 && b[i-3] == ':' && (b[i-6] == '+' || b[i-6] == '-'))
{ {
strcat(b, " 00:00:00 +0000"); b[i-3] = b[i-2];
l += 15; b[i-2] = b[i-1];
b[--i] = '\0';
} }
i = l;
while (i-- > 0) while (i-- > 0)
{ {
if (b[i] == '+' || b[i] == '-') if (b[i] == '+' || b[i] == '-')