Q:

NSDateFormat buggy?

I have the following code:
NSDateFormatter * df = [[NSDateFormatter alloc] init];
    [df setDateFormat:@"yyyy-MM-dd hh:mm:ss"];
date1 = [df dateFromString:@"2010-08-12 08:00:00"];

works as a charm, however when it is above 12:00:00, such as 23:00:00 the returned NSDate is null.
Am I being stupid?

A:

use HH instead of hh to represent 24-hr format
[df setDateFormat:@"yyyy-MM-dd HH:mm:ss"];

