If the date string is in GMT you can’t use your system Timezone to create the NSDate from the NSString.
replace the first occurrence of [dateFormat setTimeZone:[NSTimeZone systemTimeZone]];
with [dateFormat setTimeZone:[NSTimeZone timeZoneWithName:@"GMT"]];
More Related Contents:
- NSDate Format outputting wrong date
- How to parse a date string into an NSDate object in iOS?
- How do you calculate the day of the year for a specific date in Objective-C?
- NSDateFormatter, am I doing something wrong or is this a bug?
- Why NSDateFormatter can not parse date from ISO 8601 format [duplicate]
- NSDateFormatter and yyyy-MM-dd
- Convert NSString of a date to an NSDate
- How to compare two NSDates: Which is more recent?
- Comparing two NSDates and ignoring the time component
- Get NSDate from NSDate adjusted with timezone
- Ordinal Month-day Suffix Option for NSDateFormatter setDateFormat
- How Do I write a Timer in Objective-C?
- How to change the format of date in date picker
- Objective-C setting NSDate to current UTC
- Difference between two NSDate objects — Result also a NSDate
- Removing time components from an NSDate object using Objective C/Cocoa
- How to Get time difference in iPhone
- UIDatePicker, setting maximum and minimum dates based on todays date
- Formatting date and time with iPhone SDK?
- Custom colors in UITabBar
- How can I get a precise time, for example in milliseconds in Objective-C?
- When do you make an underscore in front of an instance variable? [duplicate]
- Autorotate in iOS 6 has strange behaviour
- How to find the cause of a malloc “double free” error?
- Warning: control reaches end of non-void function – iPhone
- What does the -ObjC linker flag do?
- Can an iPhone app block phone calls?
- returning UIImage from block
- Push ViewController from Right To Left with UINavigationController
- Making a call programmatically from iPhone app and returning back to the app after ending the call