From: nonunnet at gmail dot com
Operating system: ANY
PHP version: 5.2.4
PHP Bug Type: PostgreSQL related
Bug description: php_pgsql_convert' timezone parse bug
Description:
------------
'2007-01-01 01:01:01 Asia/Seoul'
'2007-01-01 01:01 America/Los_angeles'
regex '[a-zA-Z]{1,5}' cannot parse above strings.
regex change to '[-a-zA-Z_/+]{1,30}'
line 5004 on ext/pgsql/pgsql.c
- 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) == FA ILURE) {
+ 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,30})){0,1})){0,1}$",
1 TSRMLS_CC) == FA ILURE) {
--
Edit bug report at http://bugs.php.net/?id=42506&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42506&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42506&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42506&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42506&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42506&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42506&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42506&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42506&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42506&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42506&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42506&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42506&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42506&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42506&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42506&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42506&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42506&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42506&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42506&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42506&r=mysqlcfg