views:

46

answers:

1

I want to get the +7 timezone on iPhone, how can I do so? Thank you.

A: 

If you want to output the date, create an NSDateFormatter instance and set its time zone to the one you want. Then use the date formatter to create the date string.

If you want to get the date components (day, hour, etc.) of a date in a given time zone, create an NSCalendar instance, set its time zone accordingly, and send a components:fromDate: message to the calendar object.

Ole Begemann