ZF-7202: getTimezoneFromString don't detect timezone in string with month names

Issue Type: Bug Created: 2009-07-06T07:00:23.000+0000 Last Updated: 2009-07-08T13:11:16.000+0000 Status: Resolved Fix version(s): - 1.9.0 (31/Jul/09)

Reporter: fgibaux (fgibaux) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


the following code :

date_default_timezone_set ( 'America/New_York' ); $date = new Zend_Date(); echo $date->getTimezoneFromString('03:58:09 Jul 06, 2009 Indian/Reunion');

display :


because getTimezoneFromString use preg_match('/([[:alpha:]\/]{3,30})/', $zone, $match); to find timezone. Unfortunately with preg_match, only the first match is returned (Jul and not Indian/Reunion). Using preg_match_all will solve that problem.


Posted by Thomas Weidner (thomas) on 2009-07-08T13:11:12.000+0000

Fixed with r16563

Have you found an issue?

See the Overview section for more details.


© 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.