ZF-12252: [bug] No date part in 'HHHH' found.

Issue Type: Patch Created: 2012-05-26T02:34:53.000+0000 Last Updated: 2012-05-26T02:34:53.000+0000 Status: Open Fix version(s): Reporter: bluelovers (bluelovers) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


Zend_Date::setOptions(array('format_type' => 'php')); $day1 = new Zend_Date('2012-02-28');

/** * Fatal error: Uncaught exception 'Zend_Locale_Exception' with message 'No date part in 'HHHH' found.' in D:\Users\Documents\The Project\ZendFramework-1.x\library\Zend\Date.php on line 2665 */ echo('getHour', (int)$day1->getHour()); // this line throw error

library/Zend/Date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Zend/Date.php b/library/Zend/Date.php index 02393df..658179f 100644 --- a/library/Zend/Date.php +++ b/library/Zend/Date.php @@ -4174,7 +4174,7 @@ class Zend_Date extends Zend_Date_DateObject */ public function getHour($locale = null) { - return $this->copyPart(self::HOUR, $locale); + return $this->copyPart(self::HOUR_SHORT, $locale); }


No comments to display

Have you found an issue?

See the Overview section for more details.


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

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