0

I am getting a time stamp back from CLLocation manager that I want to correct to British Summer Time (GMT+1). I can do this using dateFormatter and get an NSString ...

NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setLocale:[NSLocale currentLocale]];
[dateFormatter setTimeStyle:NSDateFormatterLongStyle];
NSString *dateString = [dateFormatter stringFromDate:dateNow];
NSLog(@"DATE: %@", dateString);

My question is, is there a way to take an NSDate, localise it to GMT+1 with the result being a new NSDate. I guess I could use the above and add dateFromString: but it just feels like a very long winded way of doing what I need. Basically is there a way to go NSDate > NSDate without having to jump through the intermediate NSString?

fuzzygoat
  • 26,297
  • 46
  • 162
  • 291

1 Answers1

1

See here and here.

Community
  • 1
  • 1
NKCSS
  • 2,713
  • 1
  • 20
  • 37