0

The time is given as timestamp (in seconds). I need time only, so I take any date and add this time interval. For example:

NSDate *td = [NSDate dateWithTimeIntervalSince1970:interval];
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
dateFormatter.dateFormat = @"HH:mm";
dateFormatter.locale = @"en_GB";
NSString *result = [dateFormatter stringFromDate:d];

But it works incorrect: for 32400 it shows 12:00 (MSK) instead of 9:00. How to solve this issue?

user2083364
  • 744
  • 1
  • 7
  • 20
  • Try last example from this demo https://developer.apple.com/library/ios/samplecode/TableViewSuite/Introduction/Intro.html may it help you – python Jan 31 '14 at 11:35

1 Answers1

0
dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
user2083364
  • 744
  • 1
  • 7
  • 20