ZF-7202: getTimezoneFromString don't detect timezone in string with month names
Description
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 :
America/New_York
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.
Comments
Posted by Thomas Weidner (thomas) on 2009-07-08T13:11:12.000+0000
Fixed with r16563