Created
September 26, 2014 10:01
-
-
Save drale2k/9f850d526823a9070d4f to your computer and use it in GitHub Desktop.
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
// Get current date in ISO 8601 string | |
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; | |
[dateFormatter setLocale:enUSPOSIXLocale]; | |
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"]; | |
NSDate *now = [NSDate date]; | |
NSString *endedAt = [dateFormatter stringFromDate:now]; | |
self.workoutSessionManager.workoutSession.endedAt = endedAt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment