Issues

ZF-12095: CLONE - Zend_Date::setOptions(array('format_type' => 'php')) breaking Zend_Date

Issue Type: Bug Created: 2012-03-11T22:32:17.000+0000 Last Updated: 2012-03-12T00:51:05.000+0000 Status: Open Fix version(s): Reporter: Cameron Zemek (grom358) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Date

  • zf-crteam-review

Related issues: - ZF-11733

Attachments:

Description

'php')); $d = new Zend\_Date(); $d->set('00:00:00', Zend\_Date::TIMES); // This is throwing an exception /\* Fatal error: Uncaught exception 'Zend\_Locale\_Exception' with message 'Unknown date format, neither date nor time in 'wwww' found' in /opt/php/ZendFramework-1.11.10/library/Zend/Date.php on line 2665 Zend\_Locale\_Exception: Unknown date format, neither date nor time in 'wwww' found in /opt/php/ZendFramework-1.11.10/library/Zend/Locale/Format.php on line 849 Call Stack: 0.0001 329124 1. {main}() /var/www/bug.php:0 0.0235 3416460 2. Zend\_Date->set() /var/www/bug.php:6 0.0236 3416724 3. Zend\_Date->\_calculate() /opt/php/ZendFramework-1.11.10/library/Zend/Date.php:1078 0.0243 3417796 4. Zend\_Locale\_Format::getDate() /opt/php/ZendFramework-1.11.10/library/Zend/Date.php:2629 0.0243 3418604 5. Zend\_Locale\_Format::\_parseDate() /opt/php/ZendFramework-1.11.10/library/Zend/Locale/Format.php:1118 Zend\_Date\_Exception: Unknown date format, neither date nor time in 'wwww' found in /opt/php/ZendFramework-1.11.10/library/Zend/Date.php on line 2665 Call Stack: 0.0001 329124 1. {main}() /var/www/bug.php:0 0.0235 3416460 2. Zend\_Date->set() /var/www/bug.php:6 0.0236 3416724 3. Zend\_Date->\_calculate() /opt/php/ZendFramework-1.11.10/library/Zend/Date.php:1078 \*/ ### Comments Posted by Cameron Zemek (grom358) on 2012-03-11T22:36:51.000+0000 This Issue was marked as closed last time I submitted as not an issue. But IMO the fact the code example I posted breaks when using format\_type php means the API is broken. At the very least the documentation should be reflected to show you can't use any of the constants when using format\_type php, and it should show you how to set parts of the date when using format\_type php Posted by Adam Lundrigan (adamlundrigan) on 2012-03-12T00:50:50.000+0000 Linking back to original issues. Flagged for review by ZF CR Team.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts