|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2008-05-19 15:18 UTC] iliaa@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
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_*