Samuel Kerschbaumer wrote:
> Hello.
> 
> I think there is a bug in the LoggerDatePatternConverter::convert() method.
> In this method there is a call to ereg_replace("[^\\]u",
> sprintf(',%03d', $usecs), which should be like ereg_replace("[^\\\\]u",
> sprintf(',%03d', $usecs) instead.
> The reason is that there are two quoting mechanisms in effect: The
> quoting in a PHP string and the quoting of the regexp library.
> Strangely the actual call works with some of my PHP installations,
> whereas it causes trouble on others.
> 
> Could this be fixed?
> 
> Samuel

This handling of escaping 'u' to '\u' seems entirely unnecessary since
php's date() already lets you escape anything you want with a '\'. Try
deleting the extra stuff and have the method simply return the output of
date() on the date format and timestamp.

-Marshall

Reply via email to