Skip to content

Commit

Permalink
Fixed issue #5749: Wrong date conversion when using certain date formats
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12373 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c_schmitz committed Feb 6, 2012
1 parent bec5441 commit 69c25cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/libraries/Date_Time_Converter.php
Expand Up @@ -251,7 +251,7 @@ private function _date_to_timestamp($thedate, $mask) {
/* START FIX FOR UNITS WITHOUT LEADING ZEROS */
if ($type == "n" || $type == "j" || $type == "g" || $type == "G") {
//if its not numeric, try a shorter digit
if (!is_numeric($val)) {
if (!is_numeric($val) || strval(intval($val))!==$val) {
$val = substr($thedate, $pos, strlen($chars)-1);
$mask = str_replace($chars, $type, $mask);
} else {
Expand Down

0 comments on commit 69c25cc

Please sign in to comment.