Bug #76009 [NEW]: Cant parse v
| From: | rparker at kodama dot design | Date: | Mon, 26 Feb 2018 01:18:12 +0000 |
| Subject: | Bug #76009 [NEW]: Cant parse v | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-214105@lists.php.net to get a copy of this message | ||
From: rparker at kodama dot design
Operating system: Windows
PHP version: 7.1.14
Package: Date/time related
Bug Type: Bug
Bug description:Cant parse v
Description:
------------
`\DateTime::createFromFormat('Y-m-d\TH:i:sP',
'2015-06-09T14:00:00-07:00')` works but
`\DateTime::createFromFormat('Y-m-d\TH:i:s.vP',
'2015-06-09T14:00:00.000-07:00')` doesnt.
var_dump(\DateTime::getLastErrors()) outputs `array(4) {
["warning_count"]=> int(0) ["warnings"]=> array(0) { }
["error_count"]=>
int(2) ["errors"]=> array(2) { [26]=> string(35) "The format separator
does not match" [27]=> string(13) "Trailing data" } }`
It is being triggered by the v option which should be supported.
Test script:
---------------
\DateTime::createFromFormat('Y-m-d\TH:i:s.vP',
'2015-06-09T14:00:00.000-07:00');
var_dump(\DateTime::getLastErrors());
--
Edit bug report at https://bugs.php.net/bug.php?id=76009&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76009&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76009&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76009&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76009&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76009&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76009&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76009&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76009&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76009&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76009&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76009&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76009&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76009&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76009&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76009&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76009&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76009&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76009&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76009&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76009&r=mysqlcfg