summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorJay Smith <jay@php.net>2003-04-01 23:28:18 +0000
committerJay Smith <jay@php.net>2003-04-01 23:28:18 +0000
commit1548b1ebf463a584a97c26ec31c3970c0b29f975 (patch)
tree9421ce645bb7724392a670940e5e1ec4a07b461c /ext/pgsql/pgsql.c
parent7e8039ef0dd359ea7e7886f3f482a30f47fd8b6a (diff)
downloadphp-git-1548b1ebf463a584a97c26ec31c3970c0b29f975.tar.gz
MFH
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index fd85be62f9..5e35d41869 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -3205,7 +3205,7 @@ static php_pgsql_data_type php_pgsql_get_data_type(const char *type_name, size_t
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 @@ PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval
}
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 {