Created
September 4, 2012 02:50
-
-
Save sonsongithub/3615998 to your computer and use it in GitHub Desktop.
Is this bug...?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *input = @"Sun Mar 18 06:42:26 +0000 2007"; | |
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
[formatter setDateFormat:@"EEE MMM dd HH:mm:ss Z yyyy"]; | |
[formatter setLocale:[NSLocale systemLocale]]; | |
NSDate *date = [formatter dateFromString:input]; | |
NSLog(@"String = %@", input); | |
NSLog(@"Date = %@", date); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment