Skip to content

Instantly share code, notes, and snippets.

@fjolnir
Created August 16, 2011 08:26
Show Gist options
  • Save fjolnir/1148658 to your computer and use it in GitHub Desktop.
Save fjolnir/1148658 to your computer and use it in GitHub Desktop.
NSDateFormatter *df = [[NSDateFormatter alloc] init];
df.dateFormat = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'sssZ':00'";
df.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease];
df.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
NSDate *d = [df dateFromString:@"2011-08-15T20:13:00.003+02:00"];
NSLog(@"%@ - %@", d, df.timeZone);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment