Topic: Leading zero in time

The time display setting for leading zero (H) doesn't work for me.  I have tried H:mA and h:mA, both return the same time without the leading zero.

Is there a local setting on my system that might be preventing the leading zero from working?

Thanks,

Bill

Re: Leading zero in time

Hi Bill,

You found a bug in the time formatting of the calendar! Thank you for reporting this.
It's surprising, this bug has been there for many years and until today nobody complained. Apparently not many calendar users are interested in leading zeros.

The problem can be solved by editing the file "common/toolbox.php" and replacing line 59 . . .

 $phpFormat = str_replace(array('H','h','m'),array(($ampm ? 'h' : 'H'),($ampm ? 'g' : 'G'),'i'),$format);

by . . .

 $phpFormat = str_replace(array('h','H','m'),array(($ampm ? 'g' : 'G'),($ampm ? 'h' : 'H'),'i'),$format);

I will change this for the next calendar version.

Roel

Re: Leading zero in time

That fixed it.  I like having all the times aligned correctly when the calendar is printed.  It makes everything look better, IMHO.