Commit e707353a authored by Gregor Anzelj's avatar Gregor Anzelj Committed by Robert Lyon

format_date function returns false (Bug #1670885)

It is known that under Windows the %e modifier of strftime
function is problematic. Modifier %l is also problematic and
must be replced with %#I so that format_date will work under
Windows.

behatnotneeded

Change-Id: I7c0dec6bfd220fbd79a5608a28d152f41df47b6b
parent 6957a254
......@@ -2458,6 +2458,7 @@ function format_date($date, $formatkey='strftimedatetime', $notspecifiedkey='str
}
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
$fixedkey = str_replace('%e', '%#d', get_string($formatkey));
$fixedkey = str_replace('%l', '%#I', $fixedkey);
return strftime($fixedkey, $date);
}
return strftime(get_string($formatkey), $date);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment