Fixed errors in the date format function relating to the AM/PM output (%p) and the 12-hour cycle format (%I).
Most of the errors I have found are relating to what happens around noon. For example
2011-05-23T12:00:00 was being reported as May 23 2011 00:00 when the correct format should have been May 23 2011 12:00 for 24-hour time and May 23 2011 12:00 PM for 12-hour time.
Fixed errors in the date format function relating to the AM/PM output…
… and the 12-hour cycle format.