Skip to content

Instantly share code, notes, and snippets.

@davidwengier
Created Oct 12, 2016
Embed
What would you like to do?
NSDate *today = [NSDate date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"dd MMM yyyy"];
[dateFormat setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]];
NSString *dateString = [dateFormat stringFromDate:today];
[dateFormat release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment