ID:               45004
 Updated by:       [EMAIL PROTECTED]
 Reported By:      deusmax at gmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         PostgreSQL related
 Operating System: Linux 2.6.22
 PHP Version:      5.2CVS-2008-05-15 (CVS)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2008-05-15 11:36:25] deusmax at gmail dot com

Description:
------------
On inserting into a timestamp with time zone field the function
pg_insert() throws the following error:

pg_insert doesn't like timestamps with 

Notice: pg_insert(): '2008-05-15T16:15:16+0000' does not match with
'^([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}$'

Pg_insert() works fine for '2008-05015T16:15:16+00',the timezone has
only 2 digits.

The 4 digit time zone is:
  1) a valid PhP format, DATE_ISO8601
  2) is accepted fine when doing a regular sql insert 

It seems the regex use by pg_insert for the timestamps with timezone
should be updated to accept all formats defined by PhP constants DATE_*





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45004&edit=1

Reply via email to