jay Tue Apr 1 18:26:11 2003 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Fixed bug #23009 (pg_select with timestamp) Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.266 php4/ext/pgsql/pgsql.c:1.267 --- php4/ext/pgsql/pgsql.c:1.266 Mon Mar 10 15:30:32 2003 +++ php4/ext/pgsql/pgsql.c Tue Apr 1 18:26:10 2003 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.266 2003/03/10 20:30:32 ddhill Exp $ */ +/* $Id: pgsql.c,v 1.267 2003/04/01 23:26:10 jay Exp $ */ #include <stdlib.h> @@ -3205,7 +3205,7 @@ return PG_TIME; if (!strcmp(type_name, "timestamp") || !strcmp(type_name, "time with time zone")) return PG_TIME_WITH_TIMEZONE; - if (!strcmp(type_name, "timestamp with time zone")) + if (!strcmp(type_name, "timestamp with time zone") || !strcmp(type_name, "timestamptz")) return PG_TIMESTAMP_WITH_TIMEZONE; if (!strcmp(type_name, "interval")) return PG_INTERVAL; @@ -3665,7 +3665,7 @@ } else { /* FIXME: better regex must be used */ - if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1})){0,1}$", 1 TSRMLS_CC) == FAILURE) { + if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[a-zA-Z]{1,5})){0,1})){0,1}$", 1 TSRMLS_CC) == FAILURE) { err = 1; } else {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php