format_date function returns false (Windows)

Bug #1670885 reported by Gregor Anželj on 2017-03-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gregor Anželj

Bug Description

format_date() function uses undelying strftime function.

It is known that %e modifier is not supported. However when I use format_date() function with the following formatkey 'strftimedatetime' which translates to '%%d %%B %%Y, %%l:%%M %%p' (for English language) the functon returns false.

According to the modifier %l is the problematic one. If it is changed to %#I (under Windows) then it works as expected...

Changed in mahara:
assignee: nobody → Gregor Anželj (gregor-anzelj)

When testing this patch, it needs to be checked that the date display for date and time is still the same as in 16.10. The best to check is in the forums as a forum entry contains the date and the time.

Changed in mahara:
status: New → In Progress
importance: Undecided → Medium
milestone: none → 17.04.0

Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit e707353a34ab9a6cb534290fb5db9f728d7b56d9
Author: Gregor Anzelj <email address hidden>
Date: Mon Feb 20 03:14:16 2017 +0100

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


Change-Id: I7c0dec6bfd220fbd79a5608a28d152f41df47b6b

Robert Lyon (robertl-9) on 2017-03-15
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9) on 2017-04-27
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers