In iOS I needed “now” as a string to use in an HTTP POST. This is as short as I can see to make it:
NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setDateFormat:@"yyyy-MM-dd HH:mm:ss ZZ"]; NSString *d = [df stringFromDate: [NSDate dateWithTimeIntervalSinceNow:0]];
The first time you do something it might be painful. Here’s to hoping your pain is less than mine

Post a Comment