From: marc at weistroff dot net Operating system: PHP version: 5.5.0RC1 Package: Date/time related Bug Type: Bug Bug description:Nano precision is not supported while decoding RFC 3339 formatted date/times.
Description: ------------ While trying to parse a RFC3339 datetime, PHP will generate the error "The timezone could not be found in the database". It can cause problems with other systems that produce such date/time strings. As you can see on http://3v4l.org/Bl1Kv, it affects php from version 5.2.0 to 5.5.0. Test script: --------------- <?php date_default_timezone_set('UTC'); var_dump(date_parse("2006-12-12T10:00:00.999999999-04:00")); ?> Expected result: ---------------- array(15) { ["year"]=> int(2006) ["month"]=> int(12) ["day"]=> int(12) ["hour"]=> int(10) ["minute"]=> int(0) ["second"]=> int(0) ["fraction"]=> float(0.999999999) ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } ["is_localtime"]=> bool(true) ["zone_type"]=> int(1) ["zone"]=> int(240) ["is_dst"]=> bool(false) } Actual result: -------------- array(13) { ["year"]=> int(2006) ["month"]=> int(12) ["day"]=> int(12) ["hour"]=> int(10) ["minute"]=> int(0) ["second"]=> int(0) ["fraction"]=> float(0.99999999) ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(1) ["errors"]=> array(1) { [0]=> string(47) "The timezone could not be found in the database" } ["is_localtime"]=> bool(true) ["zone_type"]=> int(0) } -- Edit bug report at https://bugs.php.net/bug.php?id=64814&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64814&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64814&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64814&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64814&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64814&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64814&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64814&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64814&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64814&r=support Expected behavior: https://bugs.php.net/fix.php?id=64814&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64814&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64814&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64814&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64814&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64814&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64814&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64814&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64814&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64814&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64814&r=mysqlcfg