mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-14 23:51:32 +00:00
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:
parent
1b88d7bb36
commit
1006966504
2 changed files with 11 additions and 5 deletions
|
@ -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>
|
||||
|
||||
Many tweaks to build under OSX snow leopard.
|
||||
|
|
12
Postgres.m
12
Postgres.m
|
@ -688,14 +688,16 @@ static unsigned int trim(char *str)
|
|||
{
|
||||
int e;
|
||||
|
||||
/* If it's a simple date (YYYY-MM-DD) append time for start of day. */
|
||||
if (l == 10)
|
||||
i = l;
|
||||
/* Convert +/-HH:SS timezone to +/-HHSS
|
||||
*/
|
||||
if (i > 5 && b[i-3] == ':' && (b[i-6] == '+' || b[i-6] == '-'))
|
||||
{
|
||||
strcat(b, " 00:00:00 +0000");
|
||||
l += 15;
|
||||
b[i-3] = b[i-2];
|
||||
b[i-2] = b[i-1];
|
||||
b[--i] = '\0';
|
||||
}
|
||||
|
||||
i = l;
|
||||
while (i-- > 0)
|
||||
{
|
||||
if (b[i] == '+' || b[i] == '-')
|
||||
|
|
Loading…
Reference in a new issue