> On May 14, 2017, at 5:47 PM, Eric Dolecki <[email protected]> wrote: > > I have a clock. If like to present the times in a few major cities. Say > London, England. Based on the user's current time zone, present the correct > hour, min, and second for London. If I can see how to do it for one city, I > should be good for others.
Get an NSTimeZone instance based on a GMT offset or a name Create an NSDateFormatter and set its timeZone property. Use the formatter to convert [NSDate date] to a string. If you want to display the time in some other way, like an analog clock, use NSDateComponents instead of NSDateFormatter; then you can get the hours, minutes and seconds. —Jens _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
