summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-11-23 12:27:42 +0100
committerAndrey Andreev <narf@devilix.net>2016-11-23 12:27:42 +0100
commit820d9cdaac9a9c0371404ce82b60a26ed3ac938f (patch)
tree1806d3f7f729d5bdce2134f379d74c52b877c03e /system
parente49aa1f1cb63ad90d6c2d204439f538dcc282243 (diff)
Fix #4917
Diffstat (limited to 'system')
-rw-r--r--system/helpers/date_helper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 5f1fcf07e..7f072acfa 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -529,9 +529,9 @@ if ( ! function_exists('nice_date'))
}
// Date Like: YYYYMMDD
- if (preg_match('/^(\d{2})\d{2}(\d{4})$/i', $bad_date, $matches))
+ if (preg_match('/^\d{8}$/i', $bad_date, $matches))
{
- return date($format, strtotime($matches[1].'/01/'.$matches[2]));
+ return DateTime::createFromFormat('Ymd', $bad_date)->format($format);
}
// Date Like: MM-DD-YYYY __or__ M-D-YYYY (or anything in between)