Midnight is 12:00 AM. (I always used to get confused about this.) So:
... 11:59 PM, 12:00 AM (midnight), 12:01 AM ...
With A4 H/W and 1.21 F/W I have no problem setting times as long as they don't cross midnight.
All of the following are ok and do not return invalid time:
11:00 PM to 11:59 PM
12:00 AM to 1:00 AM (midnight to 1am)
12:00 AM to 5:00 AM (midnight to 5am)