While working on
MDL-49974 It was observed that %l is not supported and unit test was failing because of it.
Also %P is supported which means lowercase in linux and uppercase in windows.
A) If we want to allow %k, %l and other non-zero formatters... then we'll need to hack timestamp_to_date_string() badly with hacks like the $fixday and $fixhour ones.
B) If we don't want to allow those formatters... then IMO it would be great to ban them officially (docs required). An surely that same function can be also a good place to, with debugging enabled, perform a simple regexp looking for invalid ones and to warn about them.